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

Access Violation in ReportBuilder Preview with Master/Detail SubReport – PDF export wor

Hello,

I am experiencing an intermittent Access Violation error when previewing a report in ReportBuilder.

The report is a master/detail report with a SubReport. The reports are stored as templates in the database and loaded at runtime, so I cannot easily access design-time events such as DetailBand.BeforePrint.

The issue only happens in the Preview. Exporting the same report to PDF always works correctly.

Some observations:

With a small number of records, the preview works fine.
With a large number of records, the error starts to occur.
The page where it happens is not always the same.
It is more likely to happen when the master/detail query is slower.
EurekaLog does not capture the exception because ReportBuilder seems to handle it internally.
Running from the Delphi IDE shows an Access Violation, but outside the IDE no EurekaLog report is generated.

Environment:

Delphi 12.2
ReportBuilder: 23.04

Could this be related to the ReportBuilder preview cache, page generation, or the synchronization between master/detail pipelines?

Is there any way to trace or intercept the exception raised during preview generation?

Any advice on debugging this kind of issue would be appreciated.

Thanks.

Comments

  • Hi Felix,

    This is not a known issue. Are you able to recreate this error yourself in the Delphi debugger? If so, se the library path to \RBuilder\Source and trace into the RB source to see where the problem is occurring.

    As a test, try setting the PreviewFormSettings.SinglePageOnly property to True and see if you still get the error.
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • Hello
    Yes, I can reproduce the error while running the application from the Delphi IDE.

    I have already added the ReportBuilder source folder (\RBuilder\Source) to the library path. However, when the Access Violation occurs, the debugger does not stop at a specific line in the ReportBuilder source code, so I have not been able to determine the exact location where the error originates.

    I also tested with:

    ppReport.PreviewFormSettings.SinglePageOnly := True;

    and with this setting enabled, the Access Violation no longer occurs.

    Does the fact that the problem disappears when SinglePageOnly is set to True suggest an issue related to page caching, page generation, or the preview viewer rendering multiple pages?

    Any suggestions on additional tracing or debugging steps would be appreciated.

    thank you
Sign In or Register to comment.