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

Controlling Copies Of Section Subreports

edited December 2005 in General
Hi,

V9.02

The way I have the report laid out is with the main having only a detail
band that contains two section subreports. No data pipeline is assigned to
the main and in the BeforePrint event, I toggle the visibility of one or the
other subreport based on the printer name.

When the report is printed, setting the copies to print, through the print
dialogue, to a value other than 1 does not generate multiple copies. Is
there a way to communicate with the section subreport to cause it to print
more than one copy?

--

Bob

Comments

  • edited December 2005
    Hi Bob,

    Be sure you have the Subreport.ParentPrinterSetup property set to True and
    NewPrintJob set to False. In my testing with these properties set, I was
    able to control the number of copies using the print dialog of a section
    subreport.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2005
    Nico,

    There's the rub.

    The reason for using section subreports is to allow for different printer
    setups as the output is to either a full-page laser printer or a 3.5"
    receipt printer with each subreport formatted appropriately.

    Oddly, if I choose to collate the output, even with ParentPrinterSetup set
    to false, the correct number of copies is generated by the section
    subreports. Does this make sense or have I made a mistake in my
    application?

    I was looking for and did not find, a property that I could check from the
    subreport that would tell me the number of copies specified.
    Report.PrinterSetup.Copies is always 1 and no similar property appears to
    exist for subreports. When the print behaviour is pbChild or pbFixed this
    is not an issue, but for pbSection it may be valuable to have PrinterSetup
    accessible to RAP.

    --

    Bob

  • edited December 2005
    Hi Bob,

    If you set the ParentPrintSetup property to False for the TppSubreport
    object inside the main report, the section subreport will then use its own
    printe setup. You can access its individual printer setup by tabbing over
    to the subreport's design.


    Try using TppSubreport.Report.PrinteSetup.Copies. This should be available
    in RAP.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.