Skip to content

Commit

Permalink
Merge pull request #16 from fediachov/master
Browse files Browse the repository at this point in the history
update Introduction.md and Exporting.md
  • Loading branch information
fediachov authored Oct 31, 2018
2 parents aa4c5d2 + 8793c1c commit 6f5ed3e
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 3 deletions.
60 changes: 59 additions & 1 deletion Exporting.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,72 @@
# 7. Exporting

FastReport Open Source can save documents in HTML, BMP, PNG, JPEG, GIF, TIFF, EMF.

The following is an example of exporting a report in Jpeg file.

```csharp
// export to image
using FastReport;
using FastReport.Utils;
using FastReport.Export.Image;
...
// Create new Report
Report report = new Report();
// Load report from file
report.Load("report.frx");
// Set the parameter
report.SetParameterValue("MYPARAMETER", 1024);
// Prepare the report
report.Prepare();
// Export in Jpeg
ImageExport image = new ImageExport();
image.ImageFormat = ImageExportFormat.Jpeg;
// Set up the quality
image.JpegQuality = 90;
// Decrease a resolution
image.Resolution = 72;
// We need all pages in one big single file
image.SeparateFiles = false;
report.Export(image, "report.jpg");
```

The following is an example of exporting a report in PNG file.

```csharp
// Export in PNG
ImageExport image = new ImageExport();
image.ImageFormat = ImageExportFormat.Png;
// Increase a resolution
image.Resolution = 300;
// We need separate file for each report page, they will be numbered: report.png, report.2.png, report.3.png, etc.
image.SeparateFiles = true;
report.Export(image, "report.png");
```

The following is an example of exporting a report in HTML file.

```csharp
using FastReport;
using FastReport.Utils;
using FastReport.Export.Html;
...
// Export in HTML
HTMLExport html = new HTMLExport();
// We need embedded pictures inside html
html.EmbedPictures = true;
// Enable all report pages in one html file
html.SinglePage = true;
// We don't need a subfolder for pictures and additional files
html.SubFolder = false;
// Enable layered HTML
html.Layers = true;
// Turn off the toolbar with navigation
html.Navigator = false;
// Save the report in html
report.Export(html, "report.html");
```

*To be continued ...*

---

[Creating Report Using Code](CreatingReportUsingCode.md) | [Top Page](README.md) | [Reports in Web](WebReport.md)
10 changes: 8 additions & 2 deletions Introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ FastReport is written in C# and it is compatible with .NET Standard 2.0 and high

- Thus you can not only use application-defined datasets but also connect to any database and use tables and queries directly within the report.

### Internal Scriping
### Internal Scripting

FastReport has a built-in script engine that supports two .NET languages, C# and VB.NET. You can use all of the .NET power in your reports to perform complex data handling and much more.

Expand All @@ -50,10 +50,16 @@ You can make a report template in several ways:

- Developing report template as XML file.

- Using the FastReport Designer Community Edition. It can be downloaded from [Fast Reports home site](https://www.fast-report.com/).
- Using the FastReport Online Designer.

- Using the FastReport Designer Community Edition (freeware). It can be downloaded from [Fast Report releases page](https://github.com/FastReports/FastReport/releases).

[![Image of FastReport](images/FastReport-screenshot3-small.png)](images/FastReport-screenshot3.png)

## Exporting

FastReport Open Source [can save](Exporting.md) documents in HTML, BMP, PNG, JPEG, GIF, TIFF, EMF.

---

[Top Page](README.md) | [Fundamentals](Fundamentals.md)

0 comments on commit 6f5ed3e

Please sign in to comment.