How to print subreport to different paper bins
Hi,
I use an empty report (RepMain) which contains 2 subreports (RepSub1 and
RepSub2) in order to print these reports in one print job.
Now I want to print the first subreport (exactly the first page of this
subreport) to a different paper bin.
Whatever I tried: all pages are printed to the default bin.
This is the code I use in OnPageStart:
case RepMain.PageNo of
1:
RepMain.Engine.Page.printersetup.BinName := CurrentBin1
else
RepMain.Engine.Page.printersetup.BinName := CurrentBin2;
end;
I tried to put the code in OnPageStart of the Main report, in
OnPageStart of the subreports, I changed RepMain to RepSub1, I tried to
set ParentPrinterSetup to false - no success.
Please help how to control the paper bin of subreports within one print job.
Thanks a lot in advance.
Regards Uli
I use an empty report (RepMain) which contains 2 subreports (RepSub1 and
RepSub2) in order to print these reports in one print job.
Now I want to print the first subreport (exactly the first page of this
subreport) to a different paper bin.
Whatever I tried: all pages are printed to the default bin.
This is the code I use in OnPageStart:
case RepMain.PageNo of
1:
RepMain.Engine.Page.printersetup.BinName := CurrentBin1
else
RepMain.Engine.Page.printersetup.BinName := CurrentBin2;
end;
I tried to put the code in OnPageStart of the Main report, in
OnPageStart of the subreports, I changed RepMain to RepSub1, I tried to
set ParentPrinterSetup to false - no success.
Please help how to control the paper bin of subreports within one print job.
Thanks a lot in advance.
Regards Uli
This discussion has been closed.
Comments
Take a look at the following article on controlling the printer bin.
I suggest using the PrinterSetup.BinNames property to define the BinName
value. This way you can be absolutely sure it is correct.
Report.Engine.Page.PrinterSetup.BinName := Report.PrinterSetup.BinNames[1];
http://www.digital-metaphors.com/rbWiki/Output/Printer/Control_Bin
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks for this hint, but the code I use works fine with a single
report. The problem occurs only with the described scenario
MasterReport/Subreports.
Though I'll change my code like you suggested.
Any idea?
Regards Uli
I changed the code according to your post: no change.
Whatever I try: both subreports always print to the default paper bin.
Regards Uli
What type of subreports are you using? Does your main report only
contain a detail band or is there other information? If possible,
please send a simple example of this in .zip format to
support@digital-metaphors.com (perhaps using the DBDEMOS database) and
I'll take a look at it for you.
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Section Style subreports. The reports are assigned on runtime, they
exist as single reports in my application.
Just a detail band.
I'll try to reproduce that.
Meanwhile I found a workaround for the whole thing: I save the single
reports as Archive-Files, merge them to one file and print this file
(1st page on a different paper bin). That doesn't seem to be very
elegant, but it works.!
Thank you. Regards Uli