Home Subreports

Section Subreport...

edited January 2008 in Subreports
Hi Nico,

Now they are printing but the subreports property ParentPrinterSetup isn?t
setting . So in the report preview if i select other printer name for
example , it isn?t accepted.

I try to change the childs printersetup in the PrintDialogClose event ( with
this code : 'TppChildReport.PrinterSetup.printername :=
TppReport.PrinterSetup.printername;')but isn?t work.

Can you help me?

Thanks!

Veri

Comments

  • edited January 2008
    Hi Veri,

    I'm a bit unclear about what you are trying to accomplish. The code you
    have below simply sets the child report's printer to the printer of the main
    report. What exactly is happening in this case that is incorrect?

    Note that when setting PrinterName property, you should always use the
    PrinterNames list rather than manually entering the name. Something like
    the following...

    ppChildReport1.PrinterSetup.PrinterName :=
    ppChildReport.PrinterSetup.PrinterNames[1];

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2008
    Hi Nico,

    What i need is controll each section subreport copy.

    For example, i want to print two copies from 1? subreport and only one from
    2? and 3? subreports.

    How can i do that?

    Thanks!

    Veri

  • edited February 2008
    Hi Veri,

    In my testing, placing three section subreports in a main report and setting
    the copies to different values prints the correct amount of copies for each
    subreport if the NewPrintJob is set to True and ParentPrinterSetup is set to
    False.

    Note that setting any of the PrinterSetup properties after the Print Dialog
    has closed is too late to have an effect on the print job.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2008
    Hi Nico,

    Yes, thanks, it was exactly what i done and worked! :-)

    But i have one more question, can you help me?

    When i used the PrintToFile option and tried to print my report to PDFFile,
    it was printed to PDFFile and after it was printed again to printer selected
    in PrintDialog.

    Why?

    Thanks
    Veri










  • edited February 2008
    Hi Nico,

    Good News!! :-)

    I solved this problem setting each subreport NewPrintJob property to false
    in PrintDialogClose event when PrintToFile is set .

    Thanks!

    Veri

This discussion has been closed.