Reporting in Your Applications with Embarcadero RAD Studio

List & Label is a reporting component that integrates with applications to provide them with rich reporting capabilities. It allows developers to create sophisticated reports based on data from any source. Easy data binding for your own VCL applications is provided by List & Label’s FireDAC component, which supports numerous data sources such as Oracle, MS SQL Server, SQLite, DB2, MySQL and PostgreSQL, as well as many other databases and formats. The control over the data for reporting always remains with the application itself.

reporting embarcadero rad studio

In addition, List & Label comes with a comprehensive report designer that can be redistributed to end users free of charge. It gives end users maximum flexibility to customize their own reports and true WYSIWYG convenience. Reports are designed individually and List & Label provides numerous objects for this purpose:

  • Tables (also relational)
  • Graphics and images in numerous formats such as PNG, SVG, JPEG, WebP, TIFF and many more
  • Over 50 different barcodes (license-free and no barcode fonts required)
  • Formatted texts using RTF or HTML
  • PDF documents
  • Form elements for user input
  • Various charts for e.g. evaluations and statistics as well as data graphics and gauges
  • Crosstabs, gantt and shapefiles
  • and much more

A comprehensive formula wizard provides numerous predefined functions for performing calculations and more. This means you can easily create various projects such as reports, statistics, dashboards, receipts, forms, labels, and more with just one tool.

Tip: Even without the report designer, reports can be created or customized in runtime code using the DOM API.

Reports are printed the classic way, using the reporting component. List & Label’s own preview format provides a large number of interaction options such as drilldown, report parameters for data filtering, expandable areas and interactive sorting. These make it a breeze for the user to use the report. In particular, highly complex reports can be presented in a clear and structured manner. Reports can also be exported to a variety of formats, including PDF, Word/DOCX, Excel/XLSX, XHTML/CSS, JSON, XML, graphics formats such as PNG, SVG, JPEG, and many more for further processing.

In addition, reports can then be compressed and/or sent via the supported email protocols:

  • Simple MAPI
  • Extended MAPI (XMAPI)
  • SMTP
  • MS Graph API

Integrate List & Label into Embarcadero RAD Studio

Installing the List & Label trial is done straight through the GetIt Package Manager built into RAD Studio. Just search for “combit”, download, install, and get started:

component integration into embarcadero rad studio

The great thing about this: when you install List & Label, the Delphi FireDAC component is automatically installed as combit List & Label Components (see Component > Install Packages…) and the individual controls are used directly at design time in the VCL editor (see Palette):

installation design packages
vcl editor

Hint: If you prefer to use the C++ Builder instead of Delphi, that’s also possible. Since the component’s Delphi sources are included, the C++ Builder component can be easily compiled and installed using msbuild – see the article Using the VCL FireDAC Component in C++ Builder Projects in List & Label’s knowledgebase.

Create and Print/Export Your Own Report with List & Label

In order to quickly get started with a new component, the List & Label installation provides many examples to illustrate the simple approach.

Define a Data Source – Configure Microsoft Access Database with FireDAC

In the following example, a connection to a Microsoft Access database is established via FireDAC and configured within the component, directly in RAD Studio:

defining data sources

The whole process can also be done without the dialog in RAD Studio, by specifying the data source in the application at runtime instead. This becomes important if the entire data source is not always to be provided, but rather only determined in a context-sensitive manner – decided by the application at runtime. The article FireDAC VCL Component: Creating a Data Source at Runtime in List & Label’s knowledgebase describes this in more detail.

Call the Integrated Designer and Create a Report

All you need to do is to call the report designer, in order to create the layout for a report:

procedure TForm1.btnDesignInvoiceAndItemsListClick(Sender: TObject);
  ListLabel.DataController.AutoMasterMode := TLlAutoMasterMode.mmAsFields;
  ListLabel.DataController.DataMember := '';
  ListLabel.AutoProjectFile := 'inv_lst.lst';
use integrated designer to create reports

There’s also a real data preview in the report designer so you can make live adjustments to the report:

example for real data preview

Print or Export the Created Report

Once the report is created in the report designer, it can be printed or exported to any of the available formats – the code to do this is just as simple as opening the report designer:

procedure TForm1.btnPrintInvoiceAndItemsListClick(Sender: TObject);
  ListLabel.DataController.AutoMasterMode := TLlAutoMasterMode.mmAsFields;
  ListLabel.DataController.DataMember := '';
  ListLabel.AutoProjectFile := 'inv_lst.lst';

The numerous export formats can be further controlled using individual options – both via the dialog or via options in the component code:

options for output and print


Did we spark your interest? Simply download the free List & Label trial version via the GetIt Package Manager, or directly from the combit website and get started.

Related Posts

Leave a Comment