How To…Use DataModules with ReportBuilder

Question

“Is it possible to use Delphi DataModules with my ReportBuilder application?”

Solution

As a rule of thumb, DataModules should be primarily used to contain abstract data objects such as Tables, Queries, and DataSources.  DataModules are also a good place to place DataPipelines as the TppReport object on the main form of your app will detect all pipelines in the project.

See the example below on the ideal way to use a DataModule with a ReportBuilder application.

Download: UseDataModule.zip

Sample Delphi code:

– Simply add the data module to the “uses” clause of your main form and the TppReport will be able to detect any pipelines present at design time and runtime.