Jump to content

Reportbuilder - create and show pdf in new Form ..


erich.wanker

Recommended Posts

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;

 

Link to comment
Share on other sites

... 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

Link to comment
Share on other sites

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;
 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...