erich.wanker Posted July 19, 2013 Posted July 19, 2013 Hello, can somebody tell me, why this does not work ? Thank you with UniMainModule do begin ReportName := 'report_' + FormatDateTime('ddmmyy_hhmmss', Now) + '.pdf'; ppReport1.AllowPrintToFile := True; ppReport1.ShowPrintDialog := False; ppReport1.DeviceType:='PDF'; ppReport1.TextFileName := UniServerModule.LocalCachePath + ReportName; ppReport1.Print; form_print.ShowModal; form_print.UniURLFrame1.URL:=UniServerModule.LocalCacheURL + '/' + ReportName; end; Quote
erich.wanker Posted July 19, 2013 Author Posted July 19, 2013 ... a litte bit more informations... If i put ppDBPipeline and ppReport on MainModule OR on other Forms - the uniGUI Application ist not longer working after i try to print something... i use a Firebird 2.5 Database i use ZeosLib7 / ZConnection /ZQuery i changed the Database connection to: Interbase / TIBDatabase / TIBQuery - but same error... if i delete the Reportbuilder Components and the used units (..ppParameter, ppProd, ppClass, ppReport, ppComm, ppRelatv, ppDB, ppDBPipe) then the Testapplication works.. Does anyone use the "Reportbuilder" from digital metaphors successfully ? which kind of Database do you use ? which components do you use to connect to the database ? Thank you Quote
rencarnacion Posted July 19, 2013 Posted July 19, 2013 Here like I do. Do not Forget to put in Use : ppPDFDevice , ppXLSDevice; Uses ppPDFDevice , ppXLSDevice; procedure TUniMainModule.Imprimir(ReporteSalida: TppReport);var lPDFDevice: TppPDFDevice; CacheFileName: string;begin // creat and configure the PDFDevice lPDFDevice := TppPDFDevice.Create(nil); CacheFileName := UniServerModule.LocalCachePath + 'Reporte.pdf'; try lPDFDevice.PDFSettings := ReporteSalida.PDFSettings; lPDFDevice.FileName := CacheFileName; // assign output stream lPDFDevice.Publisher := ReporteSalida.Publisher; // generate the report ReporteSalida.PrintToDevices; UniSession.SendFile(CacheFileName); finally lPDFDevice.Free; end;end; Quote
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.