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

Question on Subreports

edited May 2006 in General
Hi all,

I have one report which works, and I allow the user to select different
criteria before they run the report. The user can select Report A, Report
B, and Report C.

The user wants to have a selection on the menu where they can view all 3
reports (A, B, and C) in preview mode. I believe this is possible using
subreports and or archive but don't know how to set it up.

Is this the right approach?
1. Run reports A, B and C and save them each to an archive file
2. Assign each archive file to a subreport (where or how would I do this?)
3. Call myReport.Print to view all three subreports

Or is there another approach I should use,

Thanks,
G. Campbell

Comments

  • edited May 2006
    Hi,

    There are a couple options....

    1. Print each report to an archive file, then use the archive merge utility
    to merge them into one file. The Archive Merge Utility is a free third
    party utility and can be downloaded from our web site.
    http://www.digital-metaphors.com/download/report_component_library.html

    2. Create a main report with only a detail band. Then dynamically add
    section style subreports to the detail band and load each created report
    into them. Section subreports are a great way to combine multiple reports
    if they are inside the detail band without any other report components.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2006
    Thanks for the answers, but I am not to clear when you say:

    What form does the created report need to be in? Is it a dynamic runtime
    object? a file?

    At what point would I do this? Would I do this after I call ppReport1.Print?

    And do I need to turn off (set to False) the screen viewer?

    Thanks again,
    G. Campbell

  • edited May 2006
    Hi,

    Another option is that you can have all three section sub-reports in the
    report and conditionally toggle their visibility.

    --

    Bob

  • edited May 2006
    My second option would include storing your existing reports as template
    files (.rtm) and dynamically loading them into subreports you create on your
    main report at runtime. This way the application could be completely soft
    coded. This would all be done before calling Report.Print.

    Another option, as Bob mentioned, is to create three subreports, manually
    load your report templates into them at design time, and toggle their
    visibility based on your user's needs.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2006
    Ok. I think I see what I need to do:

    1. Run a query that generates the data but use a different query (or table)
    component for each of the three reports. Each query (or table) will have
    it's own Datasource and ppDBPipeline components.

    2. Have three subreports set up inside a ppReport component (each point to
    their own ppDBPipeline).

    3. Call ppReport1.Print which contains the three subreports and all three
    reports should display.

    I think the error in my vision, or lack of, was that I was trying to figure
    out how all this would work by using just one Datasource and one
    ppDBPipeline component, but it looks as if I need to use three--one for each
    report.

    Thanks guys,
    G. Campbell

This discussion has been closed.