Bin switch in sub reports
Hi,
I have a report with a subreport. The subreport prints dynamically
(that is, it's supressed based on a flag in each record of the main
report).
I need to have the sub report come from a different bin (on the fly).
I've got code that swaps it properly for the main report (from the
knowledge base) however that code, placed in the start page of the
sub report, causes BOTH pages to swap to that bin, i.e. main report
shoud have used bin 1 and subreport bin 2. All previous pages were
printing bin 1 just fine. The record on the main report cause the
report to print on this particular page - instead of just the
subreport using bin2, both pages get bin 1. Subsequent prints of
the main report that do not use the subreport print to the bin1 just
fine.
Basically, I need code that will let me dynamically swap bins for the
main report as well as any subreports assuming that the subreport may
not print everytime.
Regards,
Nick Hustak
I have a report with a subreport. The subreport prints dynamically
(that is, it's supressed based on a flag in each record of the main
report).
I need to have the sub report come from a different bin (on the fly).
I've got code that swaps it properly for the main report (from the
knowledge base) however that code, placed in the start page of the
sub report, causes BOTH pages to swap to that bin, i.e. main report
shoud have used bin 1 and subreport bin 2. All previous pages were
printing bin 1 just fine. The record on the main report cause the
report to print on this particular page - instead of just the
subreport using bin2, both pages get bin 1. Subsequent prints of
the main report that do not use the subreport print to the bin1 just
fine.
Basically, I need code that will let me dynamically swap bins for the
main report as well as any subreports assuming that the subreport may
not print everytime.
Regards,
Nick Hustak
This discussion has been closed.
Comments
Try using Section style subreports and make sure the ParentPrinterSetup
property is set to False. This will ensure that the printer setup you
define stays specific to the subreport.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
If you have the ParentPrinterSetup property set to False for each of your
section subreports, you can simply assign the bin using the PrinterSetup
property when designing the subreport. (i.e. selecting the subreport tab,
then adjusting the bin property in the PrinterSetup). This will print each
subreport to the bin that is selected. You can also do this in code using
the TppSubreport.Report.PrinterSetup property before the report prints.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com