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

Report and Thread

edited October 2005 in General
Hi,
I'm writing an application where a client submit a request about a report
and a server, that work as a service, launch a thread (max 5) to generate a
report required in background mode.
If the application launch only one thread the report generated is ok, but if
more than one thread was launched no one report result ok.

I think that the components are not thread-safe is true ?
Is possible to solve this problem ?

Thanks a lot.
Mauro.

Comments

  • edited October 2005

    ReportBuilder 7 was the first version to be thread-safe and introduced RB
    Server Edition.

    RB 7 also introduced the ability to print in a background thread.

    You must provide a thread environment for the report to execute. Access the
    TppReport help topic and then navigate to the BackgroundPrintSettings
    property topic. It contains a good discussion about providing thread-safe
    data access and a thread safe container for the report.



    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2005
    Hi,
    In my application all components as TSession, TQuery, TDataSource,
    TppDBPipeline, TPPReport are created during the runtime and in the Thread
    unit but when I use BackgroundPrintSetting an error appear :
    "TppBackgroundPrintRequest.Create: Owner of producer cannot be nil for
    background printing."
    I don't understand what can be produce this error.

    Thanks a lot.


  • edited October 2005

    A form/datamodule should be used to provide a thread-safe container. Use a
    datamodule is possible. The form/datamodule should be the Owner of the
    report, datapipeline, and data access components.


    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com


    Best regards,

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