Muhammad Idris Posted September 9, 2023 Share Posted September 9, 2023 I can combine several reports in FastReport, but How do I combine the report with a PDF file in a file/folder in FastReport ? my code : procedure TFLap_SBPK.PrepareAndShow(Report: TfrxReport; Exp: TfrxPDFExport); var AUrl : string; begin Report.PrintOptions.ShowDialog := False; Report.ShowProgress := false; Report.EngineOptions.SilentMode := True; Report.EngineOptions.EnableThreadSafe := True; Report.EngineOptions.DestroyForms := False; Report.EngineOptions.UseGlobalDataSetList := False; Exp.Background := True; Exp.ShowProgress := False; Exp.ShowDialog := False; Exp.FileName := UniServerModule.NewCacheFileUrl(False, 'pdf', '', '', AUrl, True); Exp.DefaultPath := ''; Report.PreviewOptions.AllowEdit := False; Report.PrepareReport; if Billing = '1' then begin frxRekapBPJS.PrepareReport; Report.PreviewPages.AddFrom(frxRekapBPJS); end; if Resume = '1' then begin frxRadiologi.PrepareReport; Report.PreviewPages.AddFrom(frxRadiologi); end; if Konsul = '1' then begin frxKonsul.PrepareReport; Report.PreviewPages.AddFrom(frxKonsul); end; if Jawab = '1' then begin frxJawab.PrepareReport; Report.PreviewPages.AddFrom(frxJawab); end; if Terapi = '1' then begin frxTerapi.PrepareReport; Report.PreviewPages.AddFrom(frxTerapi); end; if Fisik = '1' then begin frxFisik.PrepareReport; Report.PreviewPages.AddFrom(frxFisik); end; if PermintaanTerapi = '1' then begin frxPermintaanTerapi.PrepareReport; Report.PreviewPages.AddFrom(frxPermintaanTerapi); end; if Kematian = '1' then begin frxKematian.PrepareReport; Report.PreviewPages.AddFrom(frxKematian); end; if RujukKeluarRS = '1' then begin frxRujuk.PrepareReport; Report.PreviewPages.AddFrom(frxRujuk); end; if Lain = '1' then begin FUrl := UniServerModule.FilesFolderURL + 'eKlaim_PDF/'; frxReport1.LoadFromFile(FUrl+QBiayaNama_File.AsString); frxReport1.PrepareReport; Report.PreviewPages.AddFrom(frxReport1); end; Report.Export(Exp); UniPDFFrame1.PdfURL := AUrl + '#page=1&zoom=100'; end; 1 Quote Link to comment Share on other sites More sharing options...
Muhammad Idris Posted February 1 Author Share Posted February 1 On 9/10/2023 at 12:19 AM, Muhammad Idris said: I can combine several reports in FastReport, but How do I combine the report with a PDF file in a file/folder in FastReport ? my code : procedure TFLap_SBPK.PrepareAndShow(Report: TfrxReport; Exp: TfrxPDFExport); var AUrl : string; begin Report.PrintOptions.ShowDialog := False; Report.ShowProgress := false; Report.EngineOptions.SilentMode := True; Report.EngineOptions.EnableThreadSafe := True; Report.EngineOptions.DestroyForms := False; Report.EngineOptions.UseGlobalDataSetList := False; Exp.Background := True; Exp.ShowProgress := False; Exp.ShowDialog := False; Exp.FileName := UniServerModule.NewCacheFileUrl(False, 'pdf', '', '', AUrl, True); Exp.DefaultPath := ''; Report.PreviewOptions.AllowEdit := False; Report.PrepareReport; if Billing = '1' then begin frxRekapBPJS.PrepareReport; Report.PreviewPages.AddFrom(frxRekapBPJS); end; if Resume = '1' then begin frxRadiologi.PrepareReport; Report.PreviewPages.AddFrom(frxRadiologi); end; if Konsul = '1' then begin frxKonsul.PrepareReport; Report.PreviewPages.AddFrom(frxKonsul); end; if Jawab = '1' then begin frxJawab.PrepareReport; Report.PreviewPages.AddFrom(frxJawab); end; if Terapi = '1' then begin frxTerapi.PrepareReport; Report.PreviewPages.AddFrom(frxTerapi); end; if Fisik = '1' then begin frxFisik.PrepareReport; Report.PreviewPages.AddFrom(frxFisik); end; if PermintaanTerapi = '1' then begin frxPermintaanTerapi.PrepareReport; Report.PreviewPages.AddFrom(frxPermintaanTerapi); end; if Kematian = '1' then begin frxKematian.PrepareReport; Report.PreviewPages.AddFrom(frxKematian); end; if RujukKeluarRS = '1' then begin frxRujuk.PrepareReport; Report.PreviewPages.AddFrom(frxRujuk); end; if Lain = '1' then begin FUrl := UniServerModule.FilesFolderURL + 'eKlaim_PDF/'; frxReport1.LoadFromFile(FUrl+QBiayaNama_File.AsString); frxReport1.PrepareReport; Report.PreviewPages.AddFrom(frxReport1); end; Report.Export(Exp); UniPDFFrame1.PdfURL := AUrl + '#page=1&zoom=100'; end; Is there a solution to this problem? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 1 Share Posted February 1 34 minutes ago, Muhammad Idris said: Is there a solution to this problem? Hello, I think this is more of a question for the FastReport forum. 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.