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

Report creation very slow

Hi,
I'm running Delphi 12 and ReportBuilder 22.06.
Creating a report with one header and one detail containing a subreport that contains a subreport.
The report is sent to a PDF-file.
Using TADOQuery to generate data from a MySQL database.

With one header and detail containing 34 rows, subreport1 26 rows and subreport2 33rows it take little more than 36 seconds to generate a 5 pages PDF-report. It is a very small report.

Do you have some advice on how to avoid this long processing time?

Regards
Dag

Comments

  • edited December 9
    Hi Dag,

    This is not a known issue with RB 22.

    How are you linking your datasets? Delphi query linking (i.e. "where MyTable.Field = :Value"), can be slow to process due to the fact that it refreshes each time the record changes.

    An alternative is to use DataPipeline linking (or DADE) to link your datasets which only execute once. See the following article for more information. https://rbwiki.digital-metaphors.com/data-access/database/linking-sql-queries/

    If the above does not help, try placing some or all of your data into in-memory datasets (such as TClientDataset or FDMemTable) and see if that speeds things up. If not, please send a simple example here in .zip format and we'll see what is happening. Send examples to support@digital-metaphors.com.
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • Hi Nico,
    my report is very simple with a single row of HeaderData and a list of rows as detaildata.
    I have for each Headerdata and the Detaildata a ppDBPipeline connected to a DataSource that is connected to a ADOQuery.
    ppDBPipeline1 -> DataSource1 -> ADOQuery1 (One row of HeaderData)
    ppDBPipeline2 -> DataSource2 -> ADOQuery2 (Several rows as detaildata)

    The query is executed once for each dataset with the ADOQuery.

    I then have the HeaderData, ppDBPipeline1, presented in a TableGrid in the report HeaderBand and the detail, ppDBPipeline2, presented in the report DetailBand also using a TableGrid.

    Regards
    Dag
  • Hi Dag,

    I'm still a bit unclear about how your report is designed. In your initial post, you mention that you have at least 2 subreports (one nested) in your detail band.

    Which pipelines are these subreports connected to?

    If you are using subreports, you most likely need to link your datasets in a master-detail relationship. Otherwise, the entire dataset (the subreport is connected do) will be printed/traversed for each master record. This is compounded when using nested subreports.
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • Hi Nico,
    I understand that it is a little confusing for you.
    My Subreports are connected as you say in a master-detail relationship. What happened here is that I tested the report without the subreports and found that there was no difference in time so I came to the conclusion that my problem is in the base-report and not in the subreport.
    Forgot to mention this for you and I'm sorry for that.

    Regards
    Dag
  • Hi again Nico,
    suddenly without knowing what I did the reports is no generated as fast as can be expected.
    I was editing the report templates and suddenly I noticed that the speed increased. As I said, I have no idea what I did that affected the performance and I have edited the templates several times before and I have had this problem for a very long time.

    I apologize for wasting your time and you can remove this ticket if you like.

    Regads
    Dag
  • Hi Dag,

    Great! Glad you got it solved.

    If you have any other issue or this problem arises again, please contact us with a simple example and we'll continue researching what is happening.
    Best Regards,

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