[]
Occurs when the report needs to locate a data source from the calling application.
public event LocateDataSourceEventHandler LocateDataSource
Type | Description |
---|---|
LocateDataSourceEventHandler | Occurs when the report needs to locate a data source from the calling application. |
PageReport pageReport = new PageReport(reportFilePath);
pageReport.Document.LocateDataSource += (sender, args) =>
{
if (args.DataSet.Name == "Catalog")
{
DataSet ds = new DataSet();
ds.ReadXml("XML_Schema_and_Data.xml");
args.Data = ds.Tables[0];
}
};
reportPreview.LoadDocument(pageReport.Document);