Developer Tools
|
Office Productivity Applications
|
Platform-Agnostic APIs
|
Home | Online Demos | Downloads | Buy Now | Support | About Us | News | Working Together | Contact Us
eDocEngine has "report-export interface components" for providing multiple output format support for Delphi reporting tools. For ReportBuilder, eDocEngine has the TgtRBExportInterface
export interface component.
You can either let the end-user of the ReportBuilder application to choose the output provided by eDocEngine in an interactive report "Print" dialog box or you could export the report programmatically in Object Pascal.
In either case, you need to pair an instance of the eDocEngine interface component to an eDocEngine document-creation engine component. For example, to output a ReportBuilder report to PDF, a TgtRBExportInterface
instance needs to be paired with a TgtPDFEngine
instance on the same form as a ReportBuilder control.
If you have an existing ReportBuilder application and wish to let the end-user select the output format, then you can add eDocEngine output support without writing any code. Just follow these steps.
TgtPDFEngine
control, the reporting application would have automatically gained PDF output support.Here is a tutorial on how to create a ReportBuilder report from scratch and add report-export capabilities provided by eDocEngine.
TppReport
, TppDBPipeline
, TDataSource
and TADODataSet
controls, one each, on the form.TADODataSet
control and set it up to retrieve records from a database table.
DataSet
property of the TDataSource
control to the TADODataSet
control.DataSource
property of the TppDBPipeline
control to the TDataSource
control.DataPipeline
property of the TppReport
control to the TppDBPipeline
control.TgtRBExportInterface
controls to the form.TgtPDFEngine
, TgtRTFEngine
and TgtExcelEngine
.Engine
property of each TgtRBExportInterface
control to one of these engine controls.TppReport
to edit the default report template.Fields
panel, drag and drop fields to the Detail section of the report.
ppReport1.Print; // Execute the report
AfterPrint
event of the TppReport
control, add the following event handler.Close; // Close the form
You can export ReportBuilder to eDocEngine programmatically in two ways:
Print()
method of the ReportBuilder report component. To try it out:
procedure TForm1.Demo_TgtRBExportInterface_From_Report; begin gtPDFEngine1.Preferences.OpenAfterCreate := true; gtPDFEngine1.FileDescription := 'Adobe PDF Files (Generated by eDocEngine)'; gtRBExportInterface1.Engine := gtPDFEngine1; gtRBExportInterface1.MetafileAsRasterImage := True; ADODataSet1.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=FPNWIND.MDB;' + 'Mode=Read;Persist Security Info=False'; ADODataSet1.CommandText := 'SELECT * FROM EMPLOYEES'; DataSource1.DataSet := ADODataSet1; ppDBPipeline1.DataSource := DataSource1; ppReport1.DataPipeline := ppDBPipeline1; ppReport1.Template.FileName := 'rb_template.rtm'; ppReport1.AllowPrintToFile := True; ppReport1.TextFileName := 'sample_rb_report_export.pdf'; ppReport1.Print; end;
RenderDocument()
method of the TgtRBExportInterface component, as shown below:
{ Add the following components to a form. 1. TgtRBExportInterface 2. TppArchiveReader } procedure TForm1.Demo_TgtRBExportInterface_From_RAF; var gtPDFEngine1: TgtPDFEngine; begin // Create a PDF engine gtPDFEngine1 := TgtPDFEngine.Create(Nil); // Set output file name for the PDF engine gtPDFEngine1.FileName := 'sample_rb_export.pdf'; // Connect report export interface to PDF engine gtRBExportInterface1.Engine := gtPDFEngine1; // Read report ppArchiveReader1.ArchiveFileName := 'sample_RB_report.raf'; // Generate report ppArchiveReader1.PrintToDevices; // Export generated report to PDF gtRBExportInterface1.RenderDocument(TppReport(ppArchiveReader1)); // Clean up ppArchiveReader1.Reset; end;
---o0O0o---
Our .NET Developer Tools | |
---|---|
Gnostice Document Studio .NETMulti-format document-processing component suite for .NET developers. |
PDFOne .NETA .NET PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, and bookmark PDF documents in .NET applications. |
Our Delphi/C++Builder developer tools | |
---|---|
Gnostice Document Studio DelphiMulti-format document-processing component suite for Delphi/C++Builder developers, covering both VCL and FireMonkey platforms. |
eDocEngine VCLA Delphi/C++Builder component suite for creating documents in over 20 formats and also export reports from popular Delphi reporting tools. |
PDFtoolkit VCLA Delphi/C++Builder component suite to edit, enhance, view, print, merge, split, encrypt, annotate, and bookmark PDF documents. |
Our Java developer tools | |
---|---|
Gnostice Document Studio JavaMulti-format document-processing component suite for Java developers. |
PDFOne (for Java)A Java PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, bookmark PDF documents in Java applications. |
Our Platform-Agnostic Cloud and On-Premises APIs | |
---|---|
StarDocsCloud-hosted and On-Premises REST-based document-processing and document-viewing APIs |
Privacy | Legal | Feedback | Newsletter | Blog | Resellers | © 2002-2024 Gnostice Information Technologies Private Limited. All rights reserved. |