create pdf report for fpweb application lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- velissariouc · 2012-07-17 17:23 I'm trying to port a dektop application to a fast cgi web application. The old app used lazreport and initially i thought that since lazreport can export reports to pdf files the port would be easy. But it seems that lazreport does not work with  fcgi applications. So are there any report engines suitable for fcgi applications ? ---------------------------------------------------------------------- Leledumbo · 2012-07-18 02:53 Explain does not work and what you have done to do the porting. ---------------------------------------------------------------------- velissariouc · 2012-07-18 06:30 I  create a new project of type FastCGIApplication. So my Application object is defined in fpfcgi.pp instead of Forms which was the case for the old desktop project. Now I add a datamodule and i put a component of type TfrReport on it. I build and get errors like the following: protocol_fcgi_w.lpr(14,1) Error: Undefined symbol: WSRegisterCustomImageList protocol_fcgi_w.lpr(14,1) Error: Undefined symbol: WSRegisterMenuItem protocol_fcgi_w.lpr(14,1) Error: Undefined symbol: WSRegisterMenu protocol_fcgi_w.lpr(14,1) Error: Undefined symbol: WSRegisterMainMenu protocol_fcgi_w.lpr(14,1) Error: Undefined symbol: WSRegisterPopupMenu ... protocol_fcgi_w.lpr(14,1) Fatal: There were 49 errors compiling module, stopping ---------------------------------------------------------------------- Leledumbo · 2012-07-18 12:21 Add interfaces unit, use nogui widgetset. ---------------------------------------------------------------------- velissariouc · 2012-07-18 13:28 Thank you Leledumbo for your help. I followed your advise and now I can succesfully build my project. But when I try to create a pdf report using the following command: if frReport.PrepareReport then           frReport.ExportTo(TFrTNPDFExportFilter, 'c:\test.pdf'); I get a lot of error messages lke these: Stack trace: $0045FAB0 TCANVAS__REQUIREDSTATE, line 1672 of ./include/canvas.inc $0045CC33 TCANVAS__SETPIXEL, line 147 of ./include/canvas.inc $0054820A TFRREPORT__CREATE, line 8054 of lr_class.pas $00485C50 INITCOMPONENT, line 3109 of lresources.pp $00485ABB INITLAZRESOURCECOMPONENT, line 3136 of lresources.pp $00484CB7 INITRESOURCECOMPONENT, line 795 of lresources.pp $00415355 TMAINFORM__PDFREQUEST, line 654 of main.pas It seems that lazReport need a "real" canvas in order to prepare the report. So now my question is: How can I create a project that is both a gui and a fastcgi application? ---------------------------------------------------------------------- Leledumbo · 2012-07-18 13:36 I'll try creating one tomorrow at office (my fpc at home (2.7.1 r21848) is currently unable to build lazarus due to optimization bug). ---------------------------------------------------------------------- velissariouc · 2012-07-30 21:54 Finally I decided to use the Haru library ( http://libharu.org/wiki/Main_Page ). The latest version of the libhpdf.dll is not available for download in binary format so I had to build it myself. It took me some time so I blogged about it here http://velissariouc.blogspot.com/2012/07/and-free-pascal-i-am- developing-web.html