ElCherchu Posted August 28, 2021 Share Posted August 28, 2021 Hello programmers, I have a problem in Fast Report using Unigui, I can't understand, when I load the report at runtime the data from my dataset is not displayed, but if I do it directly without frxReport1.LoadFromFile(); everything goes well. I'm using Delphi 10.2, UniGui 1.90.0.1530 and Fast Report 6.9.12. The idea is to be able to load my reports at runtime and have the data displayed, I use function TfrDM.GeneraReportePDF(const RepName: string): string; begin try frxRep.PrintOptions.ShowDialog := False; frxRep.ShowProgress := false; frxRep.EngineOptions.SilentMode := True; frxRep.EngineOptions.EnableThreadSafe := True; frxRep.EngineOptions.DestroyForms := False; frxRep.EngineOptions.UseGlobalDataSetList := False; frxRep.LoadFromFile(UniServerModule.FilesFolderPath + RepName + '.fr3'); if frxRep.Version >= '6.0.0' then frxRep.DataSets.Add(frxDSetRecibos); frxPDFExport.Background := True; frxPDFExport.ShowProgress := False; frxPDFExport.ShowDialog := False; frxPDFExport.FileName := UniServerModule.NewCacheFileUrl(False, 'pdf', '', '', Result, True); frxPDFExport.DefaultPath := ''; frxRep.PreviewOptions.AllowEdit := False; frxRep.PrepareReport; frxRep.Export(frxPDFExport); finally end; end; If I comment the line frxRep.LoadFromFile(UniServerModule.FilesFolderPath + RepName + '.fr3'); everything goes well but as I said before the idea is to load report at runtime Can anyone help me? I will be very grateful, thanks.. Quote Link to comment Share on other sites More sharing options...
mhmda Posted August 29, 2021 Share Posted August 29, 2021 We do load our reports @runtime and it works just fine, you may check the file path. And we don't expose our .fr3 to the public it always in folder that can't be reach from the internet. Quote Link to comment Share on other sites More sharing options...
ElCherchu Posted August 29, 2021 Author Share Posted August 29, 2021 23 hours ago, Efrenis said: if frxRep.Version >= '6.0.0' then frxRep.DataSets.Add(frxDSetRecibos); Hey mhmda for your reply, but the I solved the problem, I’m explain it for everybody, the lines in quotes I changed for if frxRep.Version >= '6.0.0' then begin frxRep.DataSets.Add(frxDSetRecibos); frxRep.DataSets.Add(frxDSetData2); ; Because I use 2 datasets in my report, it’s necessary to add all the dataset used in report. All is ok now. Thank. Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted August 30, 2021 Share Posted August 30, 2021 15 hours ago, Efrenis said: Hey mhmda for your reply, but the I solved the problem, I’m explain it for everybody, the lines in quotes I changed for if frxRep.Version >= '6.0.0' then begin frxRep.DataSets.Add(frxDSetRecibos); frxRep.DataSets.Add(frxDSetData2); ; Because I use 2 datasets in my report, it’s necessary to add all the dataset used in report. All is ok now. Thank. Hello, you can see: http://forums.unigui.com/index.php?/topic/12090-fastreport-6_3/ Quote Link to comment Share on other sites More sharing options...
ElCherchu Posted August 30, 2021 Author Share Posted August 30, 2021 Thank u very much. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.