Home General

How combine ppReports into one dtScreen Preview

So, we have a few different ppReports, written by multiple devs at different times. The client would like to be able to preview them both, in the "Previewer" simultaneously. They no longer wish to open one at a time, then want to open them all at once in one previewer.

I noted some interesting posts (ref: http://rbwiki.digital-metaphors.com/output/pdf/how-to-merge-multiple-reports-into-one-pdf/) on using startPrintJob and endPrintJob to merge multiple ppReports into one PDF.

I am unsure how to tweak this code so the output of multiple ppReports ends up being appended to one another on the user's preview screen? We are using 18.02 with Delphi XE3.

I also noted that there is TppPreviewPlugIn mentioned in (ref: http://rbwiki.digital-metaphors.com/output/preview/how-to-preview-in-a-panel/).

I have never used this, but I am thinking one approach might be to create and control our instance of the screen previewer? Can we use this as a printdevice?

Thank you,

Shereif

Comments

  • Hi Shereif,

    The standard way to combine reports is to use Section subreports. Start by creating a single empty report with a detail band only. Then add the number of sections style subreports you need for each report to be merged. This can be done dynamically if you do not know how many reports you need to merge. Finally, load the reports into each subsequent subreport and preview the report.

    Take a look at examples 51 and 52 of the main reports demo for examples of how this can be done. The demos can be found in the following location on your machine.

    http://rbwiki.digital-metaphors.com/general/installation/tech-tip-demo-location/

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
Sign In or Register to comment.