logo
small logo
  • Produkte
  • Shop
  • Support
  • Über uns
  • Customer panel Support
    • en
    • de
    • JP
    • ZH
  • Home
  • /
  • Support
  • /
  • FAQ
  • /
  • FastReport .NET

FastReport .NET

Version: 2023.2.4 Datum: 22.03.2023 Änderungen...
  • Dokumentation
  • Deinstallation
  • Lizenz
  • FAQ

Can I add the report generator to the product that my customers are able to modify the reports? Or will every customer have to buy his own license

You can add a designer FastReport.NET to end-users without additional licensing. This means that you can add the report generator to the product only without the source code and outside the development environment.

Only Enterprise version contains this function: "Components for web-applications". Please can you write me what is it?

See about enterprise components here: http://www.fast-report.com/pbc_download/EnterpriseEn.pdf

What is the difference in the Single, Team and Site License?Please explain fully

You can order 1 single license (only per one developer). 2 team license (for teams of developers to four people inclusive. Included Build Server license). 3 site-license (for an unlimited number of work places in the organization with the one geographical address. Included Build Server license).

How much is the subscription renewal FastReport .NET? And what I'm getting from it?

Renew a subscription You can renew a subscription in your control panel. The subscription includes the technical support and product updates. It is available at a 1/3 of the full price per year. When your subscription is expired, you have two options: - renew a subscription. This will allow you to get a technical support and product updates. - continue to use the FastReport .NET. In this case, you will not able to use recent product updates and get technical support. 

We are old customer user but we don't have got a discount for this. We bought standard price. Why not let us discount was taken.

We will ask our Resseler to return you discount amount. Write to support please.

I have purchased a FastReport product. I should get the licensing information within 48 hours, but didn't get an e-mail. Also in "My downloads" I couldn't see anything about new product.

Write to support. Perhaps an error occurred while registering your new account

We would like to order update, unfortunately, in our panel is not an option.

We will give you the order to the update. Write to support.

I would like to buy the update to a "higher" version of FR* team license with discount, but I have only Single license of FR*. How much is it?

You can get a discount 30% of Single license. Price Team license - 30% of Single license = your Price. Write to support. We will give you the order.

Couldn't add FastReport .NET components on Form in Visual Studio

You should add FastReport.Editor.dll, FastReport.VSDesign.dll, FastReport.Web and FastReport.dll to the GAC. For it open Visual studio tools folder(C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts), open Developer Command Prompt for..., and write gacutil -i "reference path+ name.dll"(gacutil -i "Program Files\FastReports\FastReport.Net\Framework 4.0\FastReport.dll").Read more about GAC there - 
https://msdn.microsoft.com/en-us/library/dkkx7f79(v=vs.110).aspx

After this add FastReport controls in Visual Studio Toolbox: right click on Toolbox -> Choose Items -> Choose FastReport.dll from GAC and press OK.

How to calculate the size of the object, whose properties are set to dynamically change (AutoWidth, CanGrow, CanShrink)?

If you call .Height object property (Text1.Height), then the result will be the height of the object in the report template. When report is builded then the height changes.

You should use CalcHeight (Text1.CalcHeight ()) method to determine the height of the object in a prepared report. To calculate the width need also use CalcWidth method.

Receive an error message when compile the project:The type or namespace name 'FastReport' could not be found (are you missing a using directive or an assembly reference?)

Make sure that the project include links to the required libraries (FastReport.dll, FastReport.Web.dll). Check the .NET Framework version used by your project and the connected library.

After installing the full version FastReport .NET reports continue to be generated with the limitations.

You should delete Trial version. After it check directories C:\Windows\assembly and C:\Windows\Microsoft.NET\assembly\GAC_MSIL. It mustn't include FastReport .NET libraries. If it include - then delete it.
After uninstalling should install Full FastReport .NET version.

How to send a report in PDF format by e-mail using a code?

Use this snippet for it:
Report report = new Report();
report.Load(...);
report.RegisterData(...);
report.Prepare();

PDFExport pdfExport = new PDFExport();
EmailExport export = new EmailExport();

// set up Account properties...
export.Account.Host = "...";
export.Account.Address = "...";

// set up email properties...
export.Address = "...";
export.Subject = "...";
export.MessageBody = "...";

// send email
export.Export = pdfExport;
export.SendEmail(report);

How to Remove DATA tab for End users?

Add the "EnvironmentSettings" control to your form. 
Then add the following line before calling report.Design():

1
2
EnvironmentSettings1.DesignerSettings.Restrictions.DontCreateData = True;
EnvironmentSettings1.DesignerSettings.Restrictions.DontEditData = True;

 If you use DesignerControl then should use this:

1
2
designerControl1.Restrictions.DontCreateData = true;
designerControl1.Restrictions.DontEditData = true;

this way the data controls will be disabled.

How to inherit report from code?

1. You should create new report:

Report report = new Report();

 2. Add CustomLoadEventHandler for loading base report:

report.LoadBaseReport += new CustomLoadEventHandler(FReport_LoadBaseReport); 

 3. Load inherited report:

report.Load("InheritReport.frx"); 

 4. Delete CustomLoadEventHandler:

report.LoadBaseReport -= new CustomLoadEventHandler(FReport_LoadBaseReport); 

 5. You can show report or edit it. Report have base and inhereted reports:

report.Show(); 

Also need create event for loading base report:

1
2
3
4
5
6
private void FReport_LoadBaseReport(object sender, CustomLoadEventArgs e) 
{ 
// e.FileName contains the name of base report. It may be the file name, or an ID in the database, 
// it depends on how you load the main report 
e.Report.Load("C:\\Users\\InheritReport\\bin\\Debug\\Title2.frx"); 
} 

 And full code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
public partial class Form1 : Form
 {
 public Form1()
 {
 InitializeComponent();
 }
 
 private void Form1_Load(object sender, EventArgs e)
 {
 Report report = new Report();
 report.LoadBaseReport += new CustomLoadEventHandler(FReport_LoadBaseReport);
 report.Load("InheritReport.frx");
 report.LoadBaseReport -= new CustomLoadEventHandler(FReport_LoadBaseReport);
 
 report.Show();
 }
 
 private void FReport_LoadBaseReport(object sender, CustomLoadEventArgs e)
 {
 // e.FileName contains the name of base report. It may be the file name, or an ID in the database,
 // it depends on how you load the main report
 e.Report.Load("C:\\Users\\InheritReport\\bin\\Debug\\Title2.frx");
 }
 }

 If you want load report from database, replace Load() method on LoadFromString().

 


How to call the Java Script Function when user Click on Hyper link inside the report in ASP .NET?

You can write js code in TextObject.Huperlink object(javascript:alert('You clicked!')). 

Or write your function into *.aspx(cshtml) file: 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestInheritReports._Default" %> 
<%@ Register assembly="FastReport.Web" namespace="FastReport.Web" tagprefix="cc2" %> 
 
<script type="text/javascript"> 
function count_rabbits() { 
for(var i=1; i<=3; i++) { 
 
alert("Pull out from hat rabbit " + i +" !") 
} 
} 
</script> 
 
<!DOCTYPE html> 
 
<html xmlns="http://www.w3.org/1999/xhtml">; 
<head runat="server"> 
<title></title> 
</head> 
<body> 
<form id="form1" runat="server"> 
<div> 
 
</div> 
<cc2:WebReport ID="WebReport1" runat="server" /> 
</form> 
</body> 
</html> 

 and call function in hyperlink: 
TextObject1.Hyperlink = "javascript:count_rabbits()";


How to Remove CODE tab for End users?

Add the "EnvironmentSettings" control to your form. 
Then add the following line before calling report.Design():

environmentSettings1.DesignerSettings.Restrictions.DontEditCode = true;

this way the data controls will be disabled.

How to use FastReport .NET controls in WPF application?

You should use WindowsFormsHost control for it:

0) Add reference on FastReport.dll;

1) Add attribute into Window(Page) tag: xmlns:fr="clr-namespace:FastReport.Preview;assembly=FastReport" if you want to use PreviewControl, xmlns:fr1="clr-namespace:FastReport.Design;assembly=FastReport" - if DesignerControl;

2) Add WindowsFormsHost tag into your XAML markup:

1
2
3
<WindowsFormsHost HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.ColumnSpan="3">
 
</WindowsFormsHost>

3) Add child into WindowsFormsHost: <fr:PreviewControl></fr:PreviewControl> or <fr1:Designer></fr1:Designer>.

Full markup should look like this snippet:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<Window
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
 x:Class="WpfApplication1.MainWindow"
 Title="MainWindow" Height="375.977" Width="939.258"
 xmlns:fr="clr-namespace:FastReport.Preview;assembly=FastReport">
 <Grid>
 <Grid.ColumnDefinitions>
 <ColumnDefinition Width="*"/>
 <ColumnDefinition Width="*"/>
 <ColumnDefinition Width="*"/>
 </Grid.ColumnDefinitions>
 <WindowsFormsHost HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.ColumnSpan="3">
 <fr:PreviewControl></fr:PreviewControl>
 </WindowsFormsHost>
 </Grid>
</Window>
 

 

 

How to programmatically set the values of Format

You can do this in script or in your project using this code:

1
2
3
4
5
FastReport.Format.NumberFormat format = new FastReport.Format.NumberFormat();
format.UseLocale = false;
format.DecimalDigits = 2;
format.DecimalSeparator = ".";
format.GroupSeparator = ",";

and following that:

1
2
textObject.Formats.Clear();
textObject.Formats.Add(format);
How to create a line with gaps in MSChartObject?

You should create base System.Windows.Forms.DataVisualization.Charting.Series object and create line there. After this should assign created series for MSChartObject base chart (MSChart1.Chart.Series.Add(series);) Don't forget add System.Windows.Forms.DataVisualization.dll in Report -> Script menu and namespace System.Windows.Forms.DataVisualization.Charting.

Example of line with gaps:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
.
.
using System.Windows.Forms.DataVisualization.Charting;
 
namespace FastReport
{
 public class ReportScript
 {
 private void MSChart1_BeforePrint(object sender, EventArgs e)
 { 
 Series series = new Series("sample");
 series.ChartType = SeriesChartType.Line;
 series.BorderWidth = 2;
 series.MarkerSize = 5;
 
 series.Points.Add(new DataPoint(0, 1));
 series.Points.Add(new DataPoint(1, 2));
 DataPoint dp = new DataPoint(2, double.NaN);
 dp.IsEmpty = true;
 series.Points.Add(dp);
 series.Points.Add(new DataPoint(3, 5));
 series.Points.Add(new DataPoint(4, 8)); 
 
 MSChart1.Chart.Series.Add(series);
 
 }
 }
}

 Result:

Line with gaps

How to create MSChartObject from code?

1. Create new MSChart object, set width, height and legend:

1
2
3
4
MSChartObject MSChart1 = new MSChartObject();
 MSChart1.Width = 300;
 MSChart1.Height = 300;
 MSChart1.Chart.Legends.Add(new Legend() { Name = "Legend1", Title="Legend title"});

 2. Create ChartArea object, set name, axes titles and assign created ChartArea to MSChart:

1
2
3
4
5
ChartArea chartArea1 = new ChartArea();
 chartArea1.Name = "ChartArea1";
 chartArea1.Axes[0].Title = "X name";
 chartArea1.Axes[1].Title = "Y name";
 MSChart1.Chart.ChartAreas.Add(chartArea1);

3. Create Series object, set chart type, border width, add points and assign series to chart:

1
2
3
4
5
6
7
8
9
 Series series = new Series("sample");
 series.ChartType = SeriesChartType.Line;
 series.BorderWidth = 2;
 series.Points.Add(new DataPoint(0, 1));
 series.Points.Add(new DataPoint(1, 2));
 series.Points.Add(new DataPoint(3, 5));
 series.Points.Add(new DataPoint(4, 8));
 
 MSChart1.Chart.Series.Add(series);

 4. Assign created MSChart to DataBand:

1
2
3
4
5
Report report = new Report();
report.Load("ok.frx");
DataBand db = report.FindObject("Data1") as DataBand;
 
MSChart1.Parent = db;

 And full snippet:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 MSChartObject MSChart1 = new MSChartObject();
 MSChart1.Width = 300;
 MSChart1.Height = 300;
 MSChart1.Chart.Legends.Add(new Legend() { Name = "Legend1", Title="Legend title"});
 
 ChartArea chartArea1 = new ChartArea();
 chartArea1.Name = "ChartArea1";
 chartArea1.Axes[0].Title = "X name";
 chartArea1.Axes[1].Title = "Y name";
 MSChart1.Chart.ChartAreas.Add(chartArea1); 
 
 Series series = new Series("sample");
 series.ChartType = SeriesChartType.Line;
 series.BorderWidth = 2;
 series.Points.Add(new DataPoint(0, 1));
 series.Points.Add(new DataPoint(1, 2));
 series.Points.Add(new DataPoint(3, 5));
 series.Points.Add(new DataPoint(4, 8));
 
 MSChart1.Chart.Series.Add(series);
 
 Report report = new Report();
 report.Load("ok.frx");
 DataBand db = report.FindObject("Data1") as DataBand;
 MSChart1.Parent = db;

 Result:
MSChart 

 

 

Meine Wartung ist schon beendet. Wo kann ich die letzte verfügbare Version herunterladen?

Melden Sie sich an support.fast-report.com und wir schicken Ihnen eine aktuelle Version, die Ihrer entspricht. 

Wie kann man ProgressForm bei den Erstellung und Vorschau des Berichts deaktivieren?

Sie deaktivieren das Vorschaufenster in EnvironmentSettings:
Report report = new Report();
report.LoadPrepared("1.fpx");
EnvironmentSettings s = new EnvironmentSettings();
s.ReportSettings.ShowProgress = false;
report.Show();

Wie kann man einen Rückgang zu den Default Einstellungen für Designer machen?

Löschen Sie die Datei FastReport.config aus dem Ordner C:\Users\"Your user's name"\AppData\Local\FastReport.

Mir gefällt nicht die Übersetzung in einer von den Localizations. Wie kann ich sie verbessern?

Localizations Dateien kann man im Ordner FastReports\FastReport.Net\Localization finden. Sie können selbst die Übersetzung verändern. Wenn es in der Localisation keine gewünschte Felder gibt, können Sie sich an support.fast-report.com anmelden, danach vom Support eine englische Version bekommen und gemaß ihr Ihre gewünschte Übersetzung ergänzen. Übergeben Sie uns Ihre Übersetzung und bekommen Sie von uns ein Geschenk!

Wie kann man die Lokalisation für die gewünschte Sprache hinzufügen?

Wenn Sie keine gewünschte Sprache in den Einstellungen gefunden haben, meiden Sie sich an tz@fast-report.com oder an support.fast-report.com und wir schicken Ihnen einen Hinweis, wie Sie gebrauchte Sprache in die Lokalisation hinzufügen können. Nach der Bearbeitung schicken Sie uns die Datei und bekommen ein Geschenk von Fast Reports

Wie bekommt man den Wert vom Parameter der Abfrage aus dem Code?

Verwenden Sie dazu folgendes Codestück:

Report.Dictionary.Connections[0].Tables[0].Parameters[0].Value.ToString(); 

Wie kann man einen HTML Bericht per Email durch den Code senden?

Verwenden Sie dieses Codestück:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Report report = new Report();
 report.LoadPrepared("preparedreport.fpx");
 
 HTMLExport htmlExport = new HTMLExport()
 {
 SubFolder = false,
 Navigator = false,
 Pictures = true,
 EmbedPictures = true,
 SinglePage = true,
 Layers = true,
 HasMultipleFiles = false
 };
 EmailExport email = new EmailExport();
 
 //email mailer settings
 email.Account.Address = "Email@gmail.com";
 email.Account.Name = "Usename";
 email.Account.Host = "smtp.yandex.ru";
 email.Account.Port = 25;
 email.Account.UserName = "Email";
 email.Account.Password = "password";
 email.Account.MessageTemplate = "Test";
 email.Account.EnableSSL = true;
 
 //email addressee settings
 email.Address = "Destinationaddress@gmail.com";
 email.Subject = "Embedding of html";
 
 email.Export = htmlExport; //Set export type
 email.SendEmail(report); //Send email

 


Doesn't work web demos

If you can't run demos from Demos\C#\Web folder, then you should:

1. Repair NuGet packages;

2. Add all necessary references from "packages";

3. Change build versions on the current in Web.Config from root folder and in Views.

How to combine several reports in one?

You should use for it this snippets.

For desktop version:

1
2
3
4
5
6
7
8
Report report = new Report(); 
report.Load(Path.GetFullPath(@"..\..\Report1.frx")); 
report.Prepare(true); 
report.Load(Path.GetFullPath(@"..\..\Report2.frx")); 
report.Prepare(true); 
report.Load(Path.GetFullPath(@"..\..\Report3.frx")); 
report.Prepare(true); 
report.ShowPrepared();

 For web version:

1
2
3
4
5
6
7
8
webReport.Report.Load(Path.GetFullPath(@"..\..\Report1.frx")); 
webReport.Report.Prepare(true); 
webReport.Report.Load(Path.GetFullPath(@"..\..\Report2.frx")); 
webReport.Report.Prepare(true); 
webReport.Report.Load(Path.GetFullPath(@"..\..\Report3.frx")); 
webReport.Report.Prepare(true); 
webReport.ShowRefreshButton = false; 
webReport.ReportDone = true;

 

 

How to load into and call report from application resources?

Load report into application resources:

1)Go to Visual Studio Resourses tab ( Project -> Properties -> Resources);

2) Set name (report) and set resources content ( from myreport.frx file);

Call report from resources:

1
2
3
Report report = new Report();
report.ReportResourceString = Resources.report;
report.Show();

 

How to add assembly (dll) to report from code?

Use this snippet:

1
2
3
Report report = new Report;
List<string> assmbly = new List<string>(report.ReferencedAssemblies);
assmbly.Add("Newtonsoft.Json.dll"); //replace to your dll's name
report.ReferencedAssemblies = assmbly.ToArray();

 Be sure, that added dll placed in a same folder that FastReport.dll.

Now you can call methods from connected dll. E.g., you can add this expression into TextObject - [Newtonsoft.Json.ConstructorHandling.Default.ToString()].

How to set all tables and relations from DataSet enabled in report?

Use this snippet to set all tables from your data source as enable:

1
2
3
4
foreach (FastReport.Data.DataSourceBase tbl in report.Dictionary.DataSources)
 {
 tbl.Enabled = true;
 } 

 Then add relations:

1
2
3
4
for (int i = 0; i < ds.Relations.Count; i++)
 {
 report.RegisterData(ds.Relations[i], "relation" + i);
 }

 And set relations enabled:

1
2
3
4
 foreach (FastReport.Data.Relation rl in report.Dictionary.Relations)
 {
 rl.Enabled = true;
 }

 And full code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 Report report = new Report();
 DataSet ds = new DataSet();
 ds.ReadXml("EstimateFile.xml");
 report.RegisterData(ds, "ds");
 
 foreach (FastReport.Data.DataSourceBase tbl in report.Dictionary.DataSources)
 {
 tbl.Enabled = true;
 }
 
 for (int i = 0; i < ds.Relations.Count; i++)
 {
 report.RegisterData(ds.Relations[i], "relation" + i);
 }

 foreach (FastReport.Data.Relation rl in report.Dictionary.Relations)
 {
 rl.Enabled = true;
 } 

 

What components FastReport .NET Enterprise consist of?

FastReport .NET Enterprise consist of:
FastReport .NET Professional and Online Designer.

Visual Studio Toolbox doesn't contain FastReport .NET components

Add components to a Toolbox manually:
Click "Choose items" in toolbox and choose FastReport.dll from GAC folder (C:\Windows\Microsoft.NET\assembly\GAC_MSIL\FastReport).

Why there are no libraries for the .NET Framework 2.0 in installations since version 2020.3?

We decided to stop supporting the old framework and Visual Studio 2005. We have some difficulties with supporting various code snippets for legacy framework. If you continue to use .NET Framework 2.0 in your applictions, please write to us or use the version of FastReport .NET 2020.2 or earlier.

Wie können wir Ihre Lizenzpakete in unserem Produkt unter Linux, MacOS oder Windows installieren?

Wie können wir Ihre Lizenzpakete in unserem Produkt unter Linux, MacOS oder Windows installieren. Müssten wir gleichzeitig die neueste Version der FastReport-Produkte nicht manuell mit einem von der Webseite heruntergeladenen Installationsprogramm installieren, das nur unter Windows funktioniert?

Wir würden gerne dafür eine universelle Lösung in Form vom unseren privaten Fast Reports NuGet-Server anbieten. Lesen Sie mehr darüber im nächsten Artikel.

Wenn Ihr Abonnement abläuft, können Sie die Fast Reports-Paketquelle weiterhin nutzen, haben aber keinen Zugriff auf die neueste Paketversion. Also wird die letzte verfügbare Paketversion durch die folgende Bedingung bestimmt:

Veröffentlichungsdatum der ausgewählten Version < Ablaufdatum des berechtigten Abonnements

Wichtig! Wenn Sie versuchen, ein Paket herunterzuladen, dessen Veröffentlichungsdatum nach dem Ablaufdatum Ihres berechtigten Abonnements liegt, gibt Ihnen der Fast Reports NuGet-Server die letzte verfügbare Version des Pakets entsprechend Ihrem Abonnement. Wir raten jedoch davon ab, auf eine nicht verfügbare Paketversion zu verlinken, da dies zu einer Warnung bei der Wiederherstellung des Projekts führt und den Download des Pakets verzögert.

logo
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 901 N Pitt Str #325 Alexandria VA 22314
  • Shop
  • Download
  • Dokumentation
  • Referenzen
  • Informationen zur Deinstallation unserer Produkte
  • FAQ
  • Tutorial Video
  • Forum
  • Support SLA
  • Articles
  • Unsere Nachrichten
  • Presse über uns
  • Partner
  • Außergewöhnliche Lizenzierung
  • Kontakte

© 1998-2023 by Fast Reports Inc.

  • Datenschutz

Trustpilot