Hello,
I am using IW 15.2.57 and Delphi 11.1.
I would like to show a dinamically created pdf after a user select an invoice in a TIWjQDBGrid.
To create the pdf I am using the export feature of Fast-Report reporting tool.
I am using the following code:
At the beginning selecting different invoice the pdf is correctly shown but after some selection the pdf report the same invoice without correctly update the invoice data basing on the selected invoice.
What I am doing wrong?
Thank you,
Davide
I am using IW 15.2.57 and Delphi 11.1.
I would like to show a dinamically created pdf after a user select an invoice in a TIWjQDBGrid.
To create the pdf I am using the export feature of Fast-Report reporting tool.
I am using the following code:
Code:
var AppPath: string := WebApplication.ApplicationPath;
var CacheFileName: string := TIWAppCache.NewTempFileName();
QryDeliveries.Close;
QryOrder.Close;
QryOrder.ParamByName('OrderNo').AsString := FSelectedOrderNo;
QryOrder.Open;
QryDeliveries.Open();
Report.EngineOptions.EnableThreadSafe := True;
Report.EngineOptions.DestroyForms := False;
Report.LoadFromFile(Format('%sreports\Spedizioni.fr3', [AppPath]));
try
Report.PrepareReport;
PDFExport.FileName := CacheFileName;
Report.Export(PDFExport);
finally
Report.Clear;
end;
var Url: string := TIWAppCache.AddFileToCache(GGetWebApplicationThreadVar(), CacheFileName, 'application/pdf', ctOneTime);
WebApplication.NewWindow(Url);
At the beginning selecting different invoice the pdf is correctly shown but after some selection the pdf report the same invoice without correctly update the invoice data basing on the selected invoice.
What I am doing wrong?
Thank you,
Davide