Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Bin switch in sub reports

edited May 2006 in General
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

Comments

  • edited May 2006
    Hi Nick,

    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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2006
    On Mon, 22 May 2006 10:13:43 -0600, "Nico Cizik \(Digital Metaphors\)"
  • edited May 2006
    On Wed, 24 May 2006 12:58:57 -0400, Nick Hustak
  • edited May 2006
    On Wed, 24 May 2006 13:51:42 -0400, Nick Hustak
  • edited May 2006
    On Wed, 24 May 2006 13:51:42 -0400, Nick Hustak
  • edited May 2006
    Hi Nick,

    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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2006
    On Thu, 25 May 2006 06:35:11 -0600, "Nico Cizik \(Digital Metaphors\)"
  • edited May 2006
    On Tue, 30 May 2006 13:40:42 -0400, Nick Hustak
This discussion has been closed.