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

Threaded Report Generation

edited December 2006 in End User
Hi again!

I just made a report that is really heavy, takes like 2 minutes to generate
(+ 10.000 records) with 3 subreports with 2.000 records each).

Is it possible to send some code to help me put the report inside a TThread
and provide some feedback (like -> Printing Page 80 of 250...).

I?ve successfully made a feedback using OnStartPage / OnEndPage events using
Application.ProcessMessages but I want to give my users the ability to work
on something else while generating the "heavy" report.

Thanks again for your time and patience.

Best Regards.

Murilo

Comments

  • edited December 2006

    - ReportBuilder contains built-in support for printing via a background
    thread. See the online help topic for TppReport and then navigate to the
    topic for Report.BackgroundPrintSettings

    - Another option. If you have long reports that could be generated at
    regular intervals (perhaps nightly) then you could write an application to
    generate them to archive files (.raf) and then in the user application, use
    the ArchiveReader to preview/print the archive files.



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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited December 2006
    Cool, the idea to generate it at night is nice! I will try that.

    I will check the BackgroundPrintSettings,

    Thanks for the help!

  • edited December 2006
    Nard,

    I checked the BackgroundPrintSettings property and made a Datamodule with my
    Report, and all DB Pipelines, etc.

    But I have the following error:

    "TppBackgroundReportGenerator.ProcessRequest: Cannot Generate Report.
    Arguments are of the wrong type, are out of acceptable range, or are in
    conflict with one another"

    Its because I cannot pass variables to a SubReport that I dynamically
    loading.

    In Detail Band's BeforePrint Event, I'm opening another dataset based on a
    variable, which loads data for the subreport.

    The same report opens fine when not using BackgroundPrintSettings.

    Any ideas?

    Thanks in advance


  • edited December 2006
    Hah... it worked, problems with my parameterized query...

    Sorry

This discussion has been closed.