How to configure the FastReport.Net environment

FastReport .Net is a full-featured report solution for Windows Forms, ASP.NET, MVC and .NET Core. It can be used in Microsoft Visual Studio 2005-2019. Support .Net Framework 2.0-4.x, .NET Core 3.0 and above.

In the new version of FastReport .NET 2021.1, we have implemented support for .NET 5. Added a new barcode-Deutsce Post Leitcode. The algorithm for converting RTF into report objects has been significantly improved. And also added a new function for converting numbers. Welcome to download and experience. (Click the button below to download)

Click to download the latest version of FastReport.NET v2021.1 now

Fastreport.NET online purchase price is lower, exclusive 15% off! Hurry up and add to the shopping list!

Output report

The prepared report can be exported to one of the supported formats. At the moment, the following format can be used.

PDF format
HTML
RTF
Excel XML (Excel 2003+)
Excel 2007
CSV
TXT
OpenOffice calculation
pictures (Bmp, Png, Jpeg, Gif, Tiff, Metafile)
are exported through export filters. To do this:
prepare a report using the "prepare" method.
Create an instance of export filter and set its properties.
Call the Export method of the Report object.
The following example exports a prepared report to HTML format.
// Prepare a report
report1.Prepare();
// Create an instance of HTML export filter
FastReport.Export.Html.HTMLExport export = new FastReport.Export.Html.HTMLExport();
// Display the export options dialog and To export.
if (export.ShowDialog())
report1.Export(export, "result.html");
In this example, the export settings are carried out through the dialog window.

Configure the FastReport.Net environment

Using the EnvironmentSettings component in the toolbox, you can control some FastReport.Net environment settings. To do this, place the component on your form and use the properties window to set its properties.

The EnvironmentSettings.ReportSettings property contains some report-related settings.

Property description

Language Default Language
The default script language for new reports.

bool ShowProgress
determines whether the progress window needs to be displayed.

bool ShowPerformance
determines whether to display report performance information (report generation time, memory consumption) in the lower right corner of the preview window.

The EnvironmentSettings.DesignerSettings property contains some designer-related settings.

Property description

Icon Icon Icon The icon of the
designer window.

Default font
The default font used in the report.

The EnvironmentSettings.PreviewSettings property contains some preview-related settings.

Property description

Preview
Buttons The set of buttons visible in the preview toolbar.

int PagesInCache The
number of prepared pages that can be stored in the memory cache during preview.

bool ShowInTaskbar
determines whether to display the preview window in the Windows taskbar.

bool TopMost
determines whether the preview window should be displayed as the top table.

Icon Icon

The icon of the preview window.

string Text
The text in the preview window. If no text is set, the default text "Preview" will be used.

The EnvironmentSettings.EmailSettings property contains email account settings. These settings are used in the "Send E-mail" function in the preview window.

Property description

String address The
sender's address (such as your email address).

String name The name of the
sender (such as your name).

The string MessageTemplate is
used to create a message template for a new message. For example, "Hello, Best regards, …".

String Host
SMTP host address.

int port
SMTP port (default is 25).

String username, string password
username and password. If your server does not require authentication, leave these attributes blank.

bool AllowUI
allows these settings to be changed in the "Send Mail" dialog box. These settings will be stored in the FastReport.Net configuration file.

The UI style settings are available in the following properties of the environment settings component.

Property description

UIStyle UIStyle
designer’s style and preview form. There are 6 styles to choose from-VisualStudio2005, Office2003, Office2007Blue, Office2007Silver, Office2007Black, VistaGlass.
The default style is Office2007Black.

bool UseOffice2007Form
This property affects the designer and preview form. It determines whether the Office 2007 style form should be used if one of the following styles is selected. Office2007Blue, Office2007Silver.
Office2007Black, VistaGlass.
The default value is true.

In addition to these properties, the environment setting component also has some events. Using these events, you can do the following things.

Replace the standard "Open File" and "Save File" dialog boxes in the designer.
Replace the standard progress window.
Pass your own connection string to the connection defined in the report.
These tasks will be described in the following chapters of this manual.

Guess you like

Origin blog.csdn.net/RoffeyYang/article/details/113780391