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

Tech tip SubReference

edited December 2001 in General
I have just updated to RB 6.03.

The tech tip SubReference works okay in preview mode, but when I print the
example to my printer, all printer settings like Margins, Top, Bottom etcpp.
are vanished. Even the orientation does not work. I haven't the slightest
idea what's going on.

Can somebody confirm this behaviour?

Thanks in advance

Martin Cremer

Comments

  • edited December 2001
    I get the problem where the printer setup gets hosed when you send it to the
    printer, while the preview is correct. The fix is to set the subreport's
    ParentPrinterSetup to False when they are created.

    {add first subreport}
    lSubReport1 := TppSubReport.Create(Self);
    lSubReport1.ParentPrinterSetup := False;
    lSubReport1.Band := FReport.DetailBand;
    lSubReport1.SetReportProperty(ppReport1);
    lSubReport1.PrintBehavior := pbSection;
    lSubReport1.ResetPageNo := False;

    {add second subreport}
    lSubReport2 := TppSubReport.Create(Self);
    lSubReport2.ParentPrinterSetup := False;
    lSubReport2.Band := FReport.DetailBand;
    lSubReport2.SetReportProperty(ppReport2);
    lSubReport2.PrintBehavior := pbSection;
    lSubReport2.ResetPageNo := False;

    FReport.Print;



    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited December 2001
    Yes!!! This did the trick.

    Thank you very much, Jim.

    Cheers

    Martin Cremer



This discussion has been closed.