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

Using JITPipelines in a TService

edited June 2019 in Datapipelines
We are trying to produce reports out of a TService. We are using JITPipelines within the service (declared as public vars in the TService class) to transport the data to the report.

The same code in a VCL app works fine. But within the service the data never shows up on the produced report.

Does anyone know if the report only looks inside a TForm parent or whether it will look inside a parent TService too?

I've modified the service to run as a console app in debug and can verify the JITPipelines are created and populated with data - it's the same code as used in the VCL, which works.

Thanks

Comments

  • Hi Tom,

    I recommend creating thread-safe container(s) for the reports. Create a Form/DataModule that contains the report + data pipelines + any other components required to generate the report. For example, a data/server/service connection component if needed. (Do not use global/singletons).

    To generate a report, create an instance of the 'report module' and call a public method. Then delete the report module instance.

    The above architecture can be used for multi-threaded apps (web apps, service apps, etc) and is also efficient for use within standard desktop apps.






    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
Sign In or Register to comment.