Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to: Bind a Report to an Excel Workbook at runtime

$
0
0

This code example demonstrates how to create a new blank report at runtime (an instance of the XtraReport class), bind it to a Microsoft Excel workbook, and then, fill the report with a DetailBand containing an XRLabel to show data from this workbook.

To bind a report to an Excel data source, create a new instance of the ExcelDataSource class and specify the full path to the source Excel file using the FileName property. Then, specify required settings used to extract data from the workbook and manually define the data source schema. Finally, assign the created data source to the report using the DataSource property.

In this example, an XRLabel is added to the report to display data of one data field.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>