Using JITPipelines in a TService
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
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
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