Servant5166 Posted January 6, 2018 Share Posted January 6, 2018 Hi, I'm using ReportBuilder 18, and I need an option to download PDF's to the user's machine instead of displaying the report. How do I accomplish this? I'm using uniGUI 1.0.0.1420 and Delphi 10.2. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 6, 2018 Share Posted January 6, 2018 Hi, Use UniSession.SendFile \FMSoft\Framework\uniGUI\Demos\Desktop\SendFile Best regards, Quote Link to comment Share on other sites More sharing options...
Servant5166 Posted January 6, 2018 Author Share Posted January 6, 2018 Hi, Use UniSession.SendFile \FMSoft\Framework\uniGUI\Demos\Desktop\SendFile Best regards, I'm not sure on how to do it. I would like a save dialog box to prompt the user for filename and location. Here's my code to create the PDF below function TrepDataModule.GenRep(ID: Integer; ReportName: string): string; var lPDFDevice: TppPDFDevice; begin lPDFDevice := TppPDFDevice.Create(nil); lPDFDevice.PDFSettings := Reports.PDFSettings; lPDFDevice.FileName := UniServerModule.NewCacheFileUrl(False, 'pdf', '', '', Result, True); lPDFDevice.Publisher := Reports.Publisher; // generate the report Reports.PrintToDevices; finally lPDFDevice.Free; end; end; Thank you. Quote Link to comment Share on other sites More sharing options...
Servant5166 Posted January 8, 2018 Author Share Posted January 8, 2018 Let me try something before I ask for your help 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.