eDocEngine VCL
Create documents and reports in 18 formats
Compatibility
Delphi C++Builder

Export From ACE Reporter To PDF And Other Formats

Interactive and programmatic export from ACE Reporter using Gnostice eDocEngine VCL.
By V. Subhash

eDocEngine has "report-export interface components" for providing multiple output format support for Delphi reporting tools. For ACE Reporter, eDocEngine has the TgtAceExportInterface interface component.

You can either let the end-user of the Ace Reporter application to choose the output provided by eDocEngine in an interactive report "Save" dialog box or you could export the report programmatically in Object Pascal.

On an application built with ACE Reporter, pair an instance of this interface component with an eDocEngine document-creation engine component. For example, to output ACE Reporter reports documents to PDF, a TgtAceExportInterface instance needs to be paired with a TgtPDFEngine instance on the same form as the TSctReport.

Interactive ACE Reporter Report Export

If you want to create a simple ACE Reporter application where the end-user will select the eDocEngine-generated output, try the following steps.

  1. Open your IDE and create a VCL Forms Application.
  2. Drop the following components on the the form.
    • Tbutton
    • TSctReport
    • TDataSource
    • TADODataSet
    • TgtRTFEngine
    • TgtPDFEngine
    • TgtAceExportInterface (two instances)
  3. Set the Engine property of one of the TgtAceExportInterface control to the TgtPDFEngine control.
  4. Set the Engine property of one of the other TgtAceExportInterface control to the TgtRTFEngine control.
  5. Set the following properties of the TADODataSet control.
    • ConnectionString: Set it to a database.
    • CommandText: Set an SQL query that retrieves records from the database.
    • Active: Set it true.
  6. Set the DataSet property of the TDataSource control to the TADODataSet control. Select the TSctGrouppage (ReportPage) object and set the DataSource property to TDataSource control.
  7. Drop some TSctvarlabel controls on the Detail band of the report.
  8. Set the Variable property of the TSctvarlabel objects to a field returned by the SQL query.
  9. Double-click the TButton object and add the following click-event handler.
    SctReport1.Run;
    
  10. Run the project and click the button on the window of the form. The Report Destination dialog will then be displayed.
  11. Click the Print button to display the ACE Viewer.
  12. Click the Save Report icon to display the Save As dialog.
  13. In the Save as type list, select one of the output formats supported by eDocEngine.
  14. Enter name for the PDF document in the File name box and click Save.
  15. Programmatic ACE Reporter Report Export

    The TgtAceExportInterface component has two methods to export reports.

    public procedure RenderDocument(
        AceFile: string
    ); overload;
    
    public procedure RenderDocument(
        AceReport: TSctReport
    ); overload;
    

    If your form has a fully set-up TSctReport control, then drop a TgtAceExportInterface and a TgtPDFEngine control on it. Then, drop a button and set this click-event handler to it.

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      gtAceExportInterface1.Engine := gtPDFEngine1;
      gtPDFEngine1.Preferences.ShowSetupDialog := false;
      gtPDFEngine1.FileName := 'eDocEngine_ACEReporter_Demo.pdf';
      gtAceExportInterface1.RenderDocument(SctReport1);
      Close;
    end;
    

    If you have an ".ACE" file, then drop a TgtAceExportInterface and a TgtPDFEngine control on a form that contains a TSctReport control. Next, drop a TgtAceExportInterface and TgtPDFEngine.

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      gtAceExportInterface1.Engine := gtPDFEngine1;
      gtPDFEngine1.Preferences.ShowSetupDialog := false;
      gtPDFEngine1.FileName := 'eDocEngine_ACEReporter_Demo.pdf';
      gtAceExportInterface1.RenderDocument('eDoc_AceReporter.ace');
      Close;
    end;
    

---o0O0o---

Our .NET Developer Tools
XtremeDocumentStudio .NET

Multi-format document-processing component suite for .NET developers.

PDFOne .NET

A .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
XtremeDocumentStudio Delphi

Multi-format document-processing component suite for Delphi/C++Builder developers, covering both VCL and FireMonkey platforms.

eDocEngine VCL

A Delphi/C++Builder component suite for creating documents in over 20 formats and also export reports from popular Delphi reporting tools.

PDFtoolkit VCL

A Delphi/C++Builder component suite to edit, enhance, view, print, merge, split, encrypt, annotate, and bookmark PDF documents.

Our Java developer tools
XtremeDocumentStudio (for Java)

Multi-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
StarDocs

Cloud-hosted and On-Premises REST-based document-processing and document-viewing APIs

Privacy | Legal | Feedback | Newsletter | Blog | Resellers © 2002-2017 Gnostice Information Technologies Private Limited. All rights reserved.