How to export a report to LATEX from FastReport .NET

2022-10-05

How to export a report to LATEX from FastReport .NET

LATEX is a typesetting system, designed for the production of high-quality technical and mathematical documentation. The system also works for other documents, from simple letters to complete books. LATEX uses TEX as its layout engine.

The initial data for LATEX is a plain text file in ASCII. You can create it in any text editor. It contains the text of the document along with commands that tell LATEX how to typeset the text.

It is based on the WYSIWYM editing paradigm. It means that the user only needs to enter the data, leaving all the formatting to the program. Unlike Microsoft Word or LibreOffice Writer, where you have to manually move text around the page, in LaTeX you can just write it and it will do the rest.

Separating the content of a document from its style is one of the most convincing reasons why many people use LaTeX. This means that you can easily change the appearance of the content after writing it. Similarly, you can create one document style and use it to standardize the other files.

The possibilities of LaTeX become almost limitless with a large number of open libraries. These libraries allow users to add footnotes, draw diagrams, and more.

Save in TEX format from the designer

Let's look at this export using the Master-Detail report as an example.

A report template in the designer

 

Run the report in preview mode:

The report in preview mode

 

Now we export to the LaTeX format:

Saving to LaTeX

 

We see the window of export settings:

Export settings window

 

All settings come down to choosing report pages. Click OK and choose where to save the file. The final document will have the tex extension. We use Texmaker to display the final report.

Final file

 

Export to LATEX from code

At the beginning of the file, you must use the using directive to access the namespace, which defines the export code.

using FastReport.Export.LaTeX;

Now, we create a report and load it from a file in the right place in the program.

Report report = new Report();
report.Load("report.frx");

The next step is to prepare a report.

report.Prepare();

In the end, we create an export job and export the report to a file.

LaTeXExport export = new LaTeXExport();
report.Export(export, @"C:\report.tex");

 

Let’s sum up. The LATEX format is very convenient for print works, and FastReport exports to it without any problems.

.NET .NET Export Export FastReport FastReport
March 25, 2025

How to Merge Multiple Reports into One in FastReport .NET

FastReport .NET is a powerful tool for creating and managing reports. In this article, we will look at how to combine multiple reports into one in FastReport .NET.
March 11, 2025

How to Use FastReport .NET Avalonia on Fedora Workstation with Wayland Protocol

In this article, we will discuss how to run FastReport .NET Avalonia on the "Fedora Workstation 39" operating system with Wayland protocol.
March 07, 2025

How to Create a QR Code with an Image in FastReport .NET

The article figured out how to insert a picture into a QR Code from the report designer FastReport.NET in just a couple of clicks.
Fast Reports
  • 800-985-8986 (English, US)
  • +31 97 01025-8466 (English, EU)
  • +49 30 56837-3928 (German, DE)
  • +55 19 98147-8148 (Portuguese, BR)
  • info@fast-report.com
  • 66 Canal Center Plaza, Ste 505, Alexandria, VA 22314

© 1998-2025 Fast Reports Inc.