Jump to content

Recommended Posts

Posted

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;

 

Posted

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

Posted

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;
 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...