How to use the Report Builder of FastReport Desktop from the command line

2016-10-18

FastReport Desktop includes a console report builder.

Report Builder is a console utility for automating operations on reports.

It can perform the following operations:

  • Batch processing of reports;
  • Export to all available formats;
  • Connection of the data source;
  • Sending the result by e-mail;
  • Saving the result locally, to ftp and to cloud storages.

The report builder is closely associated with the Configurator, which creates special configuration files with instructions. These instructions allow you to specify the export of the report, select the location where the report will be saved, and send reports by email. The builder receives these instructions and executes them on a schedule, which in turn is created in the Scheduler.

But nothing prevents working with the builder directly through the command line. This can be useful if you want to export or send reports from your own application.

Let's look at three options for interacting with the Report Builder:

  • Send the configuration file to the builder. To do this, run the Report Builder with command line and pass the configuration file:

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

Here, as you see, calling a builder with one parameter: the path to the configuration file;

  • Send the configuration file to the builder and override some of its parameters . You have the option to load the configuration file and replace the required parameters, for example, the directory for saving the export of the report:

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

That is, to override the attribute, use the following pattern:

--{command name}-{parameter name}={value}

It turns out like this:

--Save-Path=./dir

  • Send command parameters to the builder . With this approach, we do not load the configuration file, but in fact we formulate the instruction for the builder in the command line. We pass the parameters, as well as how 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"

Note that we used the command Export three times. For each export property that you want to override (as opposed to the default values), you need to write the command name. In this way, you can define any parameter available in the Configurator. A complete list of commands and properties (attributes) can be found in the documentation for FastReport Desktop.

So, we have considered various options for working with the console report builder. Now you can use it in combination with your programs, you just need to transfer a set of parameters.

August 12, 2024

How to build and install the Postgres plugin in FastReport .NET

This article describes how to connect to the database using the FastReport .NET plugin for the report designer from Visual Studio via the NuGet server.
August 08, 2024

How to install FastReport .NET and its components on Windows

Step-by-step instructions for online and manual installation via the FastReport registration code.NET and its components in Windows.
July 26, 2024

Updating HTMLObject as a plugin for FastReport .NET

Detailed instructions for using the new HTMLObject plugin, which uses splitting DOM HTML into FastReport report objects.
Fast Reports
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 901 N Pitt Str #325 Alexandria VA 22314

© 1998-2024 Fast Reports Inc.