Code: Select all
foreach (var item in CollectionOfDataObjects)
{
var file = await RetrieveLabelFileFromLocalStorage("Report.mrt");
if (file == null)
{
DialogService.ShowErrorAsync(StringRetriever.GetString("csLabelService_GetLabelFileAsReport"));
return null;
}
// Create the report
StiReport report = new StiReport();
// Load the label file into the report
await report.LoadAsync(file);
// Register data as business objects
if (item != null)
report.RegBusinessObject("Data", "Data", item);
// Render the report
await report.RenderAsync();
// Print the Report
await StiPrintReport.PrintAsync(report);
}