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

Creating a batch of reports with Report Server

edited October 2007 in Server
Hello

This is following on from a post I made in the general group about creating
multiple reports in a single PDF file

The example provided was too simple for my situation. How would I create a
batch of reports in a single pdf file or print run using the report server?

I am wondering if I should use an archive volume or something like that?

Does anyone have any examples? I would have expected this to be a common
requirement?

Cheers

Paul

Comments

  • edited October 2007

    In a server environment, the report server is generating Page objects,
    sending them to the client (ClientReport/WebTier). In the case of a PDF, the
    client uses a PDFDevice to convert the Page objects to a PDF file.

    I do not understand the context of the question. I do not understand what
    the requirement is?

    - RB Server enables reports to be previewed and printed by remote clients.
    There is no concept of a 'batch run'.

    - The Archive Volume enable archive files to be previewd/printed by remote
    clients. You could certainly create a specialized application that generates
    batched report output to .raf files that are stored to a folder that the
    ArchiveVolume can 'see'. Then the server could publish the archives to
    remote clients.




    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2007
    Hello

    Here is more information.

    We have the following hierarchy

    Location Groups
    Locations
    Meters

    For example
    Location Group 1
    Location 1
    Meter 1
    Meter 2
    Location Group 2
    Location 2
    Meter 3

    The user wants to be able to run a report for all of the meters and be able
    to go through the reports using next and previous buttons. So in the
    example below the batch of reports would be made up of a report for meter 1
    followed by a report for meter 2 then finally meter 3

    All of the reports are generated using our report server. Adding the next
    and previous buttons should be easy I would expect that we can just use the
    custom preview code to add 2 new buttons.

    However, the more complicated one is to create a single pdf file containing
    the reports above, that is what I need to be able to do, but your example
    code only covers this from a client point of view, not the server

    Is this any clearer now?

    Cheers

    Paul


  • edited October 2007

    One solution is to design a single report that can generate the required
    document. (This is in contrast to the other approach, which is to call
    report.Print multiple times and then try to combing the output after it has
    been generated.)

    Perhaps a design like this...

    - create a main report
    - remove the header/footer, so that there is only a detail band
    - add a subreport to the detailband and set PrintBehavior to pbSection
    - connect the main report to a datapipeline containing a master list of
    meters
    - connect the subreport to a datapipeline containing the meter detail

    The idea is that the main report is a 'driver' that iterates over a master
    list and generates a report for each meter.

    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2007
    I think its the report.print method I need to go with this is because it
    will not be as simple as just having a pipeline containing the master list
    of meters, there is a lot of other information required

    This information is currently provided by the client on a meter by meter
    basis

    The other thing I am considering is sending the entire batch information to
    the server and building up the report dynamically but I think this could be
    quite complicated to do

    Long term we may want to do something like create a pdf file that contains
    Report 1 for meter 1 followed by Report 2 for meter 1, etc. Each report
    will have different parameters

    Any ideas?


  • edited October 2007

    There is an important concept you are missing - no output files are
    generated by the server. I tried to explain this before. As shown in the
    diagram below, the report server generates Page objects that are received by
    the client. The client can create output devices to format the page objects
    to Screen, Printer, XHTML, PDF, etc.

    report server --> Page objects --> ClientReport/WebTier --> Device (XHTML,
    PDF, etc)

    The client can ask the server about what parameters are required to run a
    report. The client can send parameter values to the server. The client can
    reques that the server generate a page or range of pages.

    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2007
    ok I see that no files are generated by the server now

    But in order for the server to generate 1 set of page objects for all of my
    reports which the client can then combine into a single file wont I need to
    send all the information in 1 go? This is what I am trying to avoid

    For example, User wants to have a PDF file that contains the following
    reports

    Report 1 - Needs location name, start date, end date (1 page)
    Report 2 - Needs units (2 pages)

    So do I have to send information about both reports to the server in a
    single call for the server to return me back 3 page objects or is there a
    way I can do a call to the server for report 1 then another for report 2,
    then be able to combine the information

    I think it has something to do with StartPrintJob and EndPrintjob, but the
    bit that confuses me is that each report request is dealt with in its own
    thread so how do I add Report 2's page objects to the page objects for
    Report 1?

  • edited October 2007
    How does the user specify the parameters to run the report?

    How would you implement this in a non-server environment?


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2007
    The parameters are specified by the user in our win32 program

    They will set up a batch of reports.

    For example, they will want to run Report 1 for all locations followed by
    Report 2 for all locations

    They specify the report options then our program will create a batch where
    each report has a set of parameters which will be provided to the report
    server

    So if the database has 2 locations the Batch would be made up of,

    Report 1 Location 1 Meter 1
    Report 1 Location 1 Meter 2
    Report 2 Location 1 Meter 1
    Report 2 Location 1 Meter 2

    Each of these reports will be distinguished by the different parameters

    The user then needs to see a pdf file containing all of these reports

    Paul



  • edited October 2007
    Any advice Nard?

  • edited October 2007
    Here is how I think we should proceed...

    Use the DBDemos data to design a representative sample and then create a
    standard Delphi project (i.e. no server) that implements a representative
    solution. Zip it up and email to support@digital-metaphors.com. We can check
    it out here and try to determine whether we can design a server based
    example that does the same thing.




    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.