ReportBuilder

ReportBuilderarrow-up-right is another widely used reporting tool in Delphi. We also generate a PDF output of the report and direct it to a TUniUrlFrame.

Pascal
lPDFDevice := TppPDFDevice.Create(nil);

try
  lPDFDevice.PDFSettings := ppReport1.PDFSettings;
  lPDFDevice.FileName    :=
    UniServerModule.NewCacheFileUrl(False,'pdf','','', AUrl);
  lPDFDevice.Publisher   := ppReport1.Publisher;

  // generate the report
  ppReport1.PrintToDevices;
  UniURLFrame1.URL := AUrl;
finally
  lPDFDevice.Free;
end;
circle-info

To avoid conflicts between VCL-based report components and the uniGUI multi-threaded engine, you must create reports dynamically.

For this you need to create a Free DataModule from the uniGUI Wizard and place all of your components and report generation code inside this module:

Free DataModule

Generation of the report will be simply performed by creating the data module as demonstrated below:

The full demo is available under the ..\demos\Report Builder folder.