Skip to content

DevExpress-Examples/reporting-winforms-label-report-in-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reporting for WinForms - Create Label Report in Code

This example demonstrates how to create a label report at runtime.

To create a report formatted to fit your labels, it is necessary to adjust some specific layout settings. Users can create labels using the Label Report Wizard with just a few clicks. However, sometimes you need to create labels at runtime. This example shows what report settings need to be configured for a particular type of label.

This example uses the CustomLabelReportBuilder helper class that follows the report creation algorithm used by our Label Report Wizard. A CustomLabelReportModel class implements the following label settings.

Label Settings

The CustomLabelReportBuilder.GenerateLabelReport method generates a report with a CustomLabelReportModel object or individual settings (listed above) as an argument(s).

Label Designer

The LabelReportValuesHelper class has methods used to fetch label report type settings, such as Label Products list or Product Details.

Label Viewer

You can store label settings in custom XML files. To do this, you must pass the path to the custom XML file to the LabelReportValuesHelper constructor.

The standard label report wizard can retrieve custom XML. Use the static DevExpress.Data.XtraReports.Labels.LabelWizardCustomization.ExternalLabelProductRepository property at the application start to specify a path to an XML file.

Files to Review

Documentation

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Create a label report at runtime.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 5