How to send reports on a schedule by email via FastReport.Desktop

2016-10-18

Often the company needs to generate periodic reports, send them to e-mail or save to a certain place. Having a report generator, it's easy to do. However, you need to create an application that will work with the report generator. This requires some programming skills and experience with the programming environment. But what if you don't have this experience, or don't want to purchase an expensive development environment license?

FastReport Desktop allows you to solve these issues. This is a stand-alone software package that doesn't require the creation of a custom application. Accordingly, no programming skills are required. FastReport Desktop allows you to: create reports, create them on a schedule, export the report to various formats, send a report by email, save reports on a local disk or on remote resources.

Let's look at this software package. It is represented by five parts:

- Designer – the program for creating report templates;

- Viewer – the program for viewing reports;

- Builder – console utility for report building;

- Configurator – the program for creating configuration files containing instructions for builder;

- Scheduler – task scheduler for reports.

On the diagram I will show the technological process of working with FastReport Desktop:

So, we are faced with the task of organizing a daily report and sending it by e-mail.

1. From the diagram above it is clear that in the beginning it is necessary to create a report with the designer. To do this, run the appropriate program. I created a simple report of the Master-Detail type, which displays a list of categories of goods. This is what it looks like:

 

We save the report to the local disk.

2. Now you need to create a configuration file.

Run the Configurator:

Select the report file in the "Report" section by pressing the button.

Then in the "Export as" section: click the checkbox to enable export and select PDF export from the drop-down menu.
You can set the PDF file settings:

 

For example, the "Text in Curves" option. In this case, all the text in the report will be drawn with curves, which makes copying the text impossible. We proceed further.

The next step is to set up the email settings. The report file will be attached to the email.

Check the checkbox in the "Send e-mail" section.
You must fill out the settings of the outgoing e-mail server:

 

On the E-mail tab, fill in the email parameters:

 

This is the main form of the program that displays all the settings:

You need to save the configuration to the hard disk. By the way, the "Run" button allows you to run the configuration immediately. Close the program and proceed to create a task in the Scheduler.

3. Run the Scheduler:

The interface is simple and straightforward. Add a new task using the "Task" menu:

The form of creating a task is also intuitively clear:

The task name, configuration file, and trigger are specified. By default, the desired trigger is selected - "Every day". For this trigger, the date and time of operation, the frequency of the recurrence are specified.

A set of triggers covers all possible needs:

We press the button "Create". In the main form a new task has appeared:

So, we see that the task is enabled and the time of the last run is still empty. Well, wait a bit.

The task worked at a given time. A note about this appeared in the field "Last run time". Now, the report will be formed every day and sent at this time.
And now check the mailbox:

 

And we see a letter with our report in PDF format.
Convenient and simple.

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.