Table of Contents

Exporting reports

List & Label Cross Platform (LLCP) supports multiple export targets for server-side and automated reporting workflows.

Use ExportConfiguration together with LlExportTarget to select the output format and destination.


Available export formats

The following targets are currently available:

Format Target Output Package
PDF Pdf .pdf combit.ListLabel31.CrossPlatform
JSON Json .json combit.ListLabel31.CrossPlatform
CSV Csv .csv combit.ListLabel31.CrossPlatform
PNG Png .png combit.ListLabel31.CrossPlatform
JPEG Jpeg .jpeg combit.ListLabel31.CrossPlatform
SVG Svg .svg combit.ListLabel31.CrossPlatform
Excel (OpenXML) Xlsx .xlsx combit.ListLabel31.CrossPlatform.Export.OpenXml
Note

The core package covers PDF, JSON, CSV, and image exports.
Excel export (Xlsx) is provided separately through the OpenXml package.


Installing export packages

Install the core package:

dotnet add package combit.ListLabel31.CrossPlatform

Install the OpenXml Excel export package when you need Xlsx output:

dotnet add package combit.ListLabel31.CrossPlatform.Export.OpenXml
Warning

If LlExportTarget.Xlsx is used without the OpenXml package, XLSX export is not available at runtime.


Basic export example

using combit.Reporting;

ListLabel listLabel = new ListLabel
{
    DataSource = GetDataSource(),
    AutoProjectFile = "reports/invoice.json",
    LicensingInfo = "..."
};

ExportConfiguration exportConfiguration = new ExportConfiguration(
    LlExportTarget.Pdf,
    "output/invoice.pdf",
    listLabel.AutoProjectFile);

listLabel.Export(exportConfiguration);

Export to specific formats

Use the same pattern and switch only the target and output file:

new ExportConfiguration(LlExportTarget.Json, "output/report.json", projectFile);
new ExportConfiguration(LlExportTarget.Csv, "output/report.csv", projectFile);
new ExportConfiguration(LlExportTarget.Png, "output/report.png", projectFile);
new ExportConfiguration(LlExportTarget.Xlsx, "output/report.xlsx", projectFile);

Choosing the right format

Use case Recommended format
Printable document exchange PDF
Structured data exchange JSON
Spreadsheet-style tabular export CSV or XLSX
Visual snapshots or previews PNG or JPEG
Scalable vector output SVG

Setting export options

Format-specific behavior is controlled through ExportConfiguration.ExportOptions. Option values are stored as strings, regardless of whether they represent booleans, numbers, or text:

ExportConfiguration exportConfiguration = new ExportConfiguration(
    LlExportTarget.Xlsx,
    "output/report.xlsx",
    projectFile);

exportConfiguration.ExportOptions[LlExportOption.XlsAllPagesOneSheet] = "1";
exportConfiguration.ExportOptions[LlExportOption.XlsShowGridlines] = "0";

listLabel.Export(exportConfiguration);
Note

Boolean-style options use the string values "0" and "1". Options that are not set fall back to the documented default.

Tip

Options that are not listed for a given format are silently ignored by that exporter. Setting, for example, an XLSX-specific option for a PDF export has no effect.


Format-specific options and restrictions

Each export target supports its own subset of LlExportOption values and has format-specific limitations. See the dedicated pages for details: