Using the Report Builder of FastReport Desktop from the command line

2017-08-13

The FastReport Desktop software package includes the console Report Builder. Report Builder - a console program to automate operations with reports.

You can perform the following operations:

  • Batch processing of reports;
  • export to all available formats;
  • Connection data source;
  • send the results by e-mail;
  • Save results locally on ftp, and to cloud storage.

Report Builder is closely connected with the Configurator, which creates a special configuration files- instructions. These instructions allow you to set the report export, choose where to save the report and send reports by email. Builder receives these instructions and execute them on a schedule that is created in the Scheduler program. But nothing prevents to work directly with the builder through the command line. This can be useful if you want to export or send reports from own applications. Let's look at three ways of interaction with Report Builder:

  • Transfer a configuration file to Builder. To do this, run the Builder on Windows command line, and pass it the configuration file:

"Builder.exe path / to / config.xml"

Here, as you understand, the builder call with one parameter - the path to the configuration file;

  • Send configuration file to the Builder and override some of its parameters. You have the option to download the configuration file and replace the options you want, for example, a directory of saving report export:

"Builder.exe --Config-Path = path / to / config.xml --Save-Path =. / Dir"

That is to override the attribute you want to use the following scheme:

- Team {name} - {parameter name} = {value}

It turns out like this:

--Save-Path =. / Dir

In the case of override commands you need to specify the Config command to specify the path to the configuration file.

  • Send parameters-commands to the builder . With this approach, we do not load the configuration file, and in fact form the instructions for the Builder on the command line. Pass parameters, as well as the we define them in the Configurator. Let's look at an example:

--Report-Path="report.frx" --Export-As=image --Export-ImageFormat=Jpeg --Export-JpegQuality=80 --Save-To=folder --Save-Path="path/to/folder"

Since we do not load a configuration file --Config command is not needed. Note that we used the command --Export three times. For each export property you want to override (as opposed to the default values), you need to write command name.

Thus it is possible to define any parameter available in the Configurator. A full list of commands and properties (attributes) can be found in the documentation for FastReport Desktop.

So, we looked at different variants of working with console Report Builder. Now you can use it in conjunction with own programs, need only transmit a set of parameters.

November 01, 2024

New Features of the FastReport VCL Editor

We are considering new features of the report editor: extension lines, highlighting of intersecting objects, updated report and data trees.
October 30, 2024

Using Styles When Creating Reports in FastReport VCL

The article discusses one of the new features of FastReport VCL — the use of styles and style sheets.
October 28, 2024

How to Set Up WSL 2 for Working with FastReport and FastCube

In this article, we will explore how to set up WSL 2 for working with FastReport and FastCube components in Lazarus for Linux.
Fast Reports
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 66 Canal Center Plaza, Ste 505, Alexandria, VA 22314

© 1998-2024 Fast Reports Inc.