Printing RDLC Report with SubReports Directly to Printer
-
I am using VS2010 so I hope it's alright that I post my question in this forum. I have a winforms app that I am trying to be able to print an RDLC report with subreports directly to the printer from the push of a button. I have the code from this link http://msdn.microsoft.com/en-us/library/ms252091%28v=vs.100%29.aspx that allows me to print directly to the printer but I can't figure out how to get it to work when the report has subreports. Everything I have researched shows examples for printing subreports using the reportviewer which I am not using. I need to be able to print directly to the printer. Can anyone help? I've been stuck on this for months. Thanks, Stacy
-
I am using VS2010 so I hope it's alright that I post my question in this forum. I have a winforms app that I am trying to be able to print an RDLC report with subreports directly to the printer from the push of a button. I have the code from this link http://msdn.microsoft.com/en-us/library/ms252091%28v=vs.100%29.aspx that allows me to print directly to the printer but I can't figure out how to get it to work when the report has subreports. Everything I have researched shows examples for printing subreports using the reportviewer which I am not using. I need to be able to print directly to the printer. Can anyone help? I've been stuck on this for months. Thanks, Stacy
In that code there were no subreport handles or processing. I use the reportviewer and want the preview in most of my apps so I am not very good at printing without a preview. You do need to look at the subreport processing though. As it stands the state is only opening and processing the local report and not the subreports from what I see in my quick read. http://msdn.microsoft.com/en-us/library/microsoft.reporting.winforms.localreport.subreportprocessing(v=vs.80).aspx[^] This is a good starting point to adapt the code that you are using.
-
In that code there were no subreport handles or processing. I use the reportviewer and want the preview in most of my apps so I am not very good at printing without a preview. You do need to look at the subreport processing though. As it stands the state is only opening and processing the local report and not the subreports from what I see in my quick read. http://msdn.microsoft.com/en-us/library/microsoft.reporting.winforms.localreport.subreportprocessing(v=vs.80).aspx[^] This is a good starting point to adapt the code that you are using.
I'm trying to find someone who has done this or figured out a work around. There is no information on printing directly to the printer with subreports without using the reportviewer. I've tried the microsoft forums and they couldn't even figure it out. Thanks anyway, Stacy