Table of Contents

Class ListLabel

Namespace
combit.Reporting
Assembly
combit.ListLabel31.CrossPlatform.dll

Represents the List & Label reporting engine.

public class ListLabel : IDisposable
Inheritance
ListLabel
Implements
Inherited Members

Examples

The following example demonstrates how to initialize and use the ListLabel reporting engine:

using DebwinLogger logger = new DebwinLogger(@"c:\logs\debwin4.log", LogLevel.Info);
ListLabel listLabel = new ListLabel
{
    Logger = logger,
    DataSource = GetNorthwindDataSet(), // Ensure you have a method that returns your DataSet
    AutoProjectFile = projectFilePath,   // Path to your project file
    LicensingInfo = "..."                // Your licensing key
};

ExportConfiguration exportConfiguration = new ExportConfiguration(LlExportTarget.Pdf, exportFilePath, projectFilePath);
exportConfiguration.ShowResult = true;
listLabel.Export(exportConfiguration);

Remarks

The ListLabel class provides comprehensive reporting capabilities, including data binding, and export functionality. Key properties include:

  • Logger – to log messages and errors.
  • DataSource – to assign the data source (for example, one of the data providers in the combit.Reporting.DataProviders namespace) used in the report.
  • AutoProjectFile – the path to the JSON report project file. If you've been working with the classic version before make sure to convert your project files.
  • LicensingInfo – the license key required for the reporting engine. A trial watermark will be printed if this property is not set.
The engine provides methods such as Export to generate output in various formats (e.g. PDF, PNG, SVG).

Constructors

ListLabel()

Initializes a new instance of the ListLabel class.

public ListLabel()

ListLabel(ILogger?, IDataProvider?, IRepository?)

Initializes a new instance of the ListLabel class with the specified logger, data provider, and file repository.

public ListLabel(ILogger? logger, IDataProvider? dataProvider, IRepository? fileRepository)

Parameters

logger ILogger

The logger to be used for logging messages.

dataProvider IDataProvider

The data provider to be used for the List & Label project.

fileRepository IRepository

The file repository containing the external files that the List & Label project depends on.

Properties

AutoMasterMode

Gets or sets the auto master mode used by the List & Label engine.

public LlAutoMasterMode AutoMasterMode { get; set; }

Property Value

LlAutoMasterMode

AutoProjectFile

Gets or sets the project file.

public string? AutoProjectFile { get; set; }

Property Value

string

DataMember

Gets or sets the data member for the List & Label project.

public string DataMember { get; set; }

Property Value

string

DataSource

Gets or sets the data source for the List & Label project.

public object? DataSource { get; set; }

Property Value

object

DesignerFunctions

Gets the list of designer functions.

public IList<DesignerFunction> DesignerFunctions { get; }

Property Value

IList<DesignerFunction>

ExportOptions

Gets and sets the export options.

public ListLabelExportOptions ExportOptions { get; set; }

Property Value

ListLabelExportOptions

Fields

Gets the collection of fields.

public IdentifierCollection Fields { get; }

Property Value

IdentifierCollection

FileRepository

Gets or sets a container for the external files that a List & Label project depends on.

public IRepository? FileRepository { get; set; }

Property Value

IRepository

LicensingInfo

Gets or sets the licensing information.

public string LicensingInfo { get; set; }

Property Value

string

Logger

Gets or sets the logger used for logging messages.

public ILogger Logger { get; set; }

Property Value

ILogger

TimeZoneInformation

Gets the time zone information that should be applied while processing data.

public TimeZoneInformation TimeZoneInformation { get; }

Property Value

TimeZoneInformation

Variables

Gets the collection of variables.

public IdentifierCollection Variables { get; }

Property Value

IdentifierCollection

Methods

Dispose()

Releases all resources used by the ListLabel instance.

public void Dispose()

Dispose(bool)

Disposes managed and unmanaged resources.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

True if called from Dispose().

EvaluateExpression(string)

Evaluates the specified expression and returns the result.

public ExpressionValue EvaluateExpression(string expression)

Parameters

expression string

The expression to evaluate.

Returns

ExpressionValue

The result of the expression evaluation.

Export(ExportConfiguration)

Exports the List & Label project using the specified export configuration.

public void Export(ExportConfiguration exportConfiguration)

Parameters

exportConfiguration ExportConfiguration

The export configuration with the desired settings to use.

GetMajorVersion()

Retrieves the major version of the current assembly.

public int GetMajorVersion()

Returns

int

The major version number of the assembly.

OpenProject(Stream)

Opens a List & Label project from the specified stream.

public ProjectBase? OpenProject(Stream projectStream)

Parameters

projectStream Stream

The stream containing the project data.

Returns

ProjectBase

The loaded ProjectBase instance, or null if loading fails.

OpenProject(string, LlDomFileMode, LlDomAccessMode, LlProject?)

Opens or creates a List & Label project from a file.

public ProjectBase? OpenProject(string projectFile, LlDomFileMode fileMode, LlDomAccessMode accessMode = LlDomAccessMode.ReadWrite, LlProject? projectType = null)

Parameters

projectFile string

The path or identifier of the project file to open or create.

fileMode LlDomFileMode

Specifies whether to open, create, or open-or-create the project file.

accessMode LlDomAccessMode

Defines the access level (read, write, or read/write) for the project file.

projectType LlProject?

The type of List & Label project to create if the file does not exist. Must be provided if fileMode is Create or OpenOrCreate and the file does not exist.

Returns

ProjectBase

The loaded ProjectBase instance, or null if loading fails.

Exceptions

ArgumentNullException

Thrown if projectType is null when creating a project is required.

SetDataBinding(object)

Sets the data binding with the specified data source.

public void SetDataBinding(object dataSource)

Parameters

dataSource object

The data source to bind to.

SetDataBinding(object, string)

Sets the data binding with the specified data source and data member.

public void SetDataBinding(object dataSource, string dataMember)

Parameters

dataSource object

The data source to bind to.

dataMember string

The data member to bind to.

Events

AutoDefineField

Occurs when a field is automatically defined.

public event EventHandler<AutoDefineElementEventArgs>? AutoDefineField

Event Type

EventHandler<AutoDefineElementEventArgs>

AutoDefineNewPage

Occurs when a new page is triggered. Can be used to add additional identifiers.

public event EventHandler<AutoDefineNewPageEventArgs>? AutoDefineNewPage

Event Type

EventHandler<AutoDefineNewPageEventArgs>

DefinePrintOptions

This event is called when a project has been loaded and allows to modify the project before it is used for printing.

public event EventHandler<DefinePrintOptionsEventArgs>? DefinePrintOptions

Event Type

EventHandler<DefinePrintOptionsEventArgs>

NextCombinationPrintStep

This event is called if AutoProjectFile contains more than one project file separated by semicolons. In this case, a combination print is triggered and this event allows to change options between two print jobs of the combination.

public event EventHandler<NextCombinationPrintStepEventArgs>? NextCombinationPrintStep

Event Type

EventHandler<NextCombinationPrintStepEventArgs>

QueryFileNameForExportJob

Occurs when the file name for an export job is queried.

public event EventHandler<QueryFileNameForExportJobEventArgs>? QueryFileNameForExportJob

Event Type

EventHandler<QueryFileNameForExportJobEventArgs>