We have a problem sending reports directly to the printer. We can send one report to the printer but when we send the same report again with different data, the original report is printed. I'm sure this is just me missing a line of code somewhere. Here is what we do.
Code: Select all
private async void PrintPriceBreakdownAsync(object sender, RoutedEventArgs e)
{
StiReport stiReport = await UUWP.Services.ReportService.GetStiReport(ReportsHelper.PriceBreakdown);
stiReport.RegBusinessObject(nameof(JobPageViewModel), nameof(JobPageViewModel), this.JobViewModel);
await stiReport.RenderAsync();
StiPrintReport stiPrintReport = new StiPrintReport(stiReport);
stiPrintReport.RegisterForPrinting();
await stiPrintReport.PrintAsync();
}
The user then enters a new job but this time when the price breakdown is printed, the original price breakdown is printed, not the new price breakdown.
The business object is loading correctly with new data.
What am I missing?