开发者

rdlc print auto generate

开发者 https://www.devze.com 2023-03-13 22:31 出处:网络
I am developing the window application using C#. I am using the reportviewer to display rdlc. I just require followi开发者_StackOverflow中文版ng things:

I am developing the window application using C#. I am using the reportviewer to display rdlc. I just require followi开发者_StackOverflow中文版ng things:

1). Print rdlc without viewing it Client will click on print button and print should go System default printer. 2). if System default printer is not available/working then it will prompt for alternative.

i don't want to use xml file


Here is what you need to do is load your report and data into the report viewer and then render the report pages into list of memory streams and print them using then PrintDocument Class here as an expample how it is done link. For the part where it asks the user if it doesn't find default printer change

if (!printDoc.PrinterSettings.IsValid)
        {
            throw new Exception("Error: cannot find the default printer.");
        }

in the Print()method with the showing of PrintDialog for user to select printer.

0

精彩评论

暂无评论...
验证码 换一张
取 消