Printed report sends previous report to printer
Posted: Tue Feb 12, 2019 11:29 pm
A belated happy new year to the team at Stimulsoft and thank you for great support in 2018.
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.
The user enters a job for a customer and prints a price breakdown. That works fine.
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?
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?