Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-08

Reading .fr3 files from LazReports

15 messages · 7 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Leonardo M. Ramé

Hi, I'm planning to migrate a desktop app from Delphi to fcl-web, and one important aspect of it, is the reporting engine. This app has many reports created with FastReport 4, and I want to let the new app generate PDFs on the fly.

If this is not possible, what do you recommend to create PDF reports from Lazarus/FPC?

Leonardo M. Ram? Griensu S.A. - Medical IT C?rdoba Tel.: 0351-4247979
Michael Van Canneyt
to Leonardo M. Ramé
Leonardo M. Ram? wrote 7 lines
Hi, I'm planning to migrate a desktop app from Delphi to fcl-web, and one important aspect of it, is the reporting engine. This app has many reports created with FastReport 4, and I want to let the new app generate PDFs on the fly. If this is not possible, what do you recommend to create PDF reports from Lazarus/FPC?

I researched this myself, but there is no clear answer.

It certainly depends on the platform. Linux/Windows ? On Linux, the existing reporting engines rely on an X-server, which is not very good for a web application. (our servers have no X installed). For example, some people seem to have FastReport 4 running in FPC, so this is good, but requires X and is not suitable for a webserver.

Michael.

Lee Jenkins

Odd, I asked about this before and was told x was not required.

Warm Regards Lee Michael Van Canneyt wrote: > > >On Mon, 23 Aug 2010, Leonardo M. Ram? wrote: > >> Hi, I'm planning to migrate a desktop app from Delphi to fcl-web, and >> one important aspect of it, is the reporting engine. This app has many >> reports created with FastReport 4, and I want to let the new app >> generate PDFs on the fly. >> >> If this is not possible, what do you recommend to create PDF reports >> from Lazarus/FPC? > >I researched this myself, but there is no clear answer. > >It certainly depends on the platform. Linux/Windows ? On Linux, the existing >reporting engines rely on an X-server, which is not very good for a web >application. (our servers have no X installed). For example, some people seem >to have FastReport 4 running in FPC, so this is good, but requires X and is >not suitable for a webserver. > > >Michael. >-- >_______________________________________________ >Lazarus mailing list > >http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Jesus Reyes
to Lee Jenkins

--- El lun 23-ago-10, Lee Jenkins escribi?:

Show quoted text 47 lines
De: Lee Jenkins Asunto: Re: [Lazarus] Reading .fr3 files from LazReports A: "Lazarus mailing list" Fecha: lunes, 23 de agosto de 2010, 17:12 Odd, I asked about this before and was told x was not required. -- Warm Regards Lee Michael Van Canneyt wrote: > > >On Mon, 23 Aug 2010, Leonardo M. Ram? wrote: > >> Hi, I'm planning to migrate a desktop app from Delphi to fcl-web, and >> one important aspect of it, is the reporting engine. This app has many >> reports created with FastReport 4, and I want to let the new app >> generate PDFs on the fly. >> >> If this is not possible, what do you recommend to create PDF reports >> from Lazarus/FPC? > >I researched this myself, but there is no clear answer. > >It certainly depends on the platform. Linux/Windows ? On Linux, the existing >reporting engines rely on an X-server, which is not very good for a web >application. (our servers have no X installed). For example, some people seem >to have FastReport 4 running in FPC, so this is good, but requires X and is >not suitable for a webserver. > > >Michael. >--

LazReport reports can be exported to PDF with PowerPDF addon, see lazreport/source/addons/pdfexport. This can of course be done programmatically

LazReport cannot import FastReport reports that I know.

PowerPDF can be used standalone and it doesn't need X or anything else.

Jesus Reyes A.

Leonardo M. Ramé
to Jesus Reyes

El lun, 23-08-2010 a las 15:44 -0700, Jesus Reyes escribi?:

Show quoted text 58 lines
--- El lun 23-ago-10, Lee Jenkins escribi?: > De: Lee Jenkins > Asunto: Re: [Lazarus] Reading .fr3 files from LazReports > A: "Lazarus mailing list" > Fecha: lunes, 23 de agosto de 2010, 17:12 > Odd, I asked about this before and > was told x was not required. > > -- > Warm Regards > > Lee > > Michael Van Canneyt > wrote: > > > > > > >On Mon, 23 Aug 2010, Leonardo M. Ram? wrote: > > > >> Hi, I'm planning to migrate a desktop app from > Delphi to fcl-web, and > >> one important aspect of it, is the reporting > engine. This app has many > >> reports created with FastReport 4, and I want to > let the new app > >> generate PDFs on the fly. > >> > >> If this is not possible, what do you recommend to > create PDF reports > >> from Lazarus/FPC? > > > >I researched this myself, but there is no clear > answer. > > > >It certainly depends on the platform. Linux/Windows ? > On Linux, the existing > >reporting engines rely on an X-server, which is not > very good for a web > >application. (our servers have no X installed). For > example, some people seem > >to have FastReport 4 running in FPC, so this is good, > but requires X and is > >not suitable for a webserver. > > > > > >Michael. > >-- LazReport reports can be exported to PDF with PowerPDF addon, see lazreport/source/addons/pdfexport. This can of course be done programmatically LazReport cannot import FastReport reports that I know. PowerPDF can be used standalone and it doesn't need X or anything else. Jesus Reyes A.

Interesting to know that, I'll try PowerPDF. If that doesn't work, I'll have to re-create the reports in Latex source, then generate the PDFs.

Leonardo M. Ram? Griensu S.A. - Medical IT C?rdoba Tel.: 0351-4247979
Michael Van Canneyt
to Lee Jenkins: Odd, I asked about this before and was told x was not required. Warm Regards Lee
Lee Jenkins wrote
Odd, I asked about this before and was told x was not required.

Of course it is. The LCL requires X.

The low-level powerpdf does not, but this is not a reporting engine.

Michael.

Show quoted text 40 lines
-- Warm Regards Lee Michael Van Canneyt wrote: > > > On Mon, 23 Aug 2010, Leonardo M. Ram? wrote: > >> Hi, I'm planning to migrate a desktop app from Delphi to fcl-web, and >> one important aspect of it, is the reporting engine. This app has many >> reports created with FastReport 4, and I want to let the new app >> generate PDFs on the fly. >> >> If this is not possible, what do you recommend to create PDF reports >> from Lazarus/FPC? > > I researched this myself, but there is no clear answer. > > It certainly depends on the platform. Linux/Windows ? On Linux, the existing > reporting engines rely on an X-server, which is not very good for a web > application. (our servers have no X installed). For example, some people seem > to have FastReport 4 running in FPC, so this is good, but requires X and is > not suitable for a webserver. > > > Michael. > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Adrian Veith
to Michael Van Canneyt: I researched this myself, but there is no clear answer. It certainly depends on the…

Have you considered using Xvfb as minimal X-Server without visual output ? I use this in combination with wine to run Windows Service-Applications developed in Delphi (which haven't been ported to fpc yet) on our linux server and it works fine.

Michael Van Canneyt wrote 29 lines
On Mon, 23 Aug 2010, Leonardo M. Ram? wrote: > Hi, I'm planning to migrate a desktop app from Delphi to fcl-web, and > one important aspect of it, is the reporting engine. This app has many > reports created with FastReport 4, and I want to let the new app > generate PDFs on the fly. > > If this is not possible, what do you recommend to create PDF reports > from Lazarus/FPC? I researched this myself, but there is no clear answer. It certainly depends on the platform. Linux/Windows ? On Linux, the existing reporting engines rely on an X-server, which is not very good for a web application. (our servers have no X installed). For example, some people seem to have FastReport 4 running in FPC, so this is good, but requires X and is not suitable for a webserver. Michael. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100824/1775ea43/attachment.html>

Michael Van Canneyt
to Adrian Veith
Adrian Veith wrote
Have you considered using Xvfb as minimal X-Server without visual output ? I use this in combination with wine to run Windows Service-Applications developed in Delphi (which haven't been ported to fpc yet) on our linux server and it works fine.

I could do this, and I could put VNC as well. But I don't want that: a web-application (or indeed any service application) should not have dependencies on a GUI; this is a matter of design principle.

The same goes for a reporting engine. The core of the engine should be totally free of GUI dependencies. I know only 2 engines which satisfy this requirement: JasperReports and Morfik's reporting engine. (those are the ones which I know, this doesn't mean there are no other ones).

Michael.

Show quoted text 32 lines
On 23.08.2010 23:18, Michael Van Canneyt wrote: > > > On Mon, 23 Aug 2010, Leonardo M. Ram? wrote: > >> Hi, I'm planning to migrate a desktop app from Delphi to fcl-web, and >> one important aspect of it, is the reporting engine. This app has many >> reports created with FastReport 4, and I want to let the new app >> generate PDFs on the fly. >> >> If this is not possible, what do you recommend to create PDF reports >> from Lazarus/FPC? > > I researched this myself, but there is no clear answer. > > It certainly depends on the platform. Linux/Windows ? On Linux, the > existing reporting engines rely on an X-server, which is not very good > for a web application. (our servers have no X installed). For example, > some people seem to have FastReport 4 running in FPC, so this is good, > but requires X and is not suitable for a webserver. > > > Michael. > > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Lee Jenkins
to Michael Van Canneyt: Of course it is. The LCL requires X. The low-level powerpdf does not, but this is not a…
Michael Van Canneyt wrote 8 lines
On Mon, 23 Aug 2010, Lee Jenkins wrote: > Odd, I asked about this before and was told x was not required. Of course it is. The LCL requires X.

My original post on 2010/3/17:

Show quoted text 11 lines
Does LazReport require X to generate reports and export them to PDF without preview? I'm thinking of using FPC for a web app that needs to produce reports. Thanks, -- Warm Regards, Lee

Jesus Reyes' response:

Show quoted text 5 lines
No it doesn't, it does require PowerPDF which also can be used stand alone. For exporting a report see lazreport/addons/pdfexport/readmne.txt Jesus Reyes A.
Warm Regards, Lee
Michael Van Canneyt
to Lee Jenkins
Lee Jenkins wrote 11 lines
Michael Van Canneyt wrote: > > > On Mon, 23 Aug 2010, Lee Jenkins wrote: > >> Odd, I asked about this before and was told x was not required. > > Of course it is. The LCL requires X. > My original post on 2010/3/17:

the basic unit of lazreport is lr_class:

unit LR_Class;
interface
{$I LR_Vers.inc}

uses
SysUtils, Classes, MaskUtils, Controls, FileUtil, Forms, ComCtrls, Dialogs, Menus, Variants, DB, Graphics, Printers, osPrinters, DOM, XMLRead, XMLConf, LCLType, LCLIntf, TypInfo, LCLProc,{$IFDEF UNIX}SysUtilsAdds,{$ENDIF} LR_View, LR_Pars,

   LR_Intrp, LR_DSet, LR_DBSet, LR_DBRel, LR_Const;

As you can see, this includes a lot of the LCL units, and they depend on X through the widgetset.

Yes, I know about the no_gui widgetset, but if you use that, you'll get a bunch of errors because of missing functionality (pagewidth/height missing or zero, no font info etc.).

Lazreport inherited from fastreport a totally misplaced dependency on the GUI, unfortunately :/

For desktop apps, this is perfectly OK. But not for web apps.

Michael.

Bogusław Brandys
to Michael Van Canneyt

Michael Van Canneyt pisze:

Show quoted text 47 lines
On Tue, 24 Aug 2010, Lee Jenkins wrote: > Michael Van Canneyt wrote: >> >> >> On Mon, 23 Aug 2010, Lee Jenkins wrote: >> >>> Odd, I asked about this before and was told x was not required. >> >> Of course it is. The LCL requires X. >> > > My original post on 2010/3/17: the basic unit of lazreport is lr_class: unit LR_Class; interface {$I LR_Vers.inc} uses SysUtils, Classes, MaskUtils, Controls, FileUtil, Forms, ComCtrls, Dialogs, Menus, Variants, DB, Graphics, Printers, osPrinters, DOM, XMLRead, XMLConf, LCLType, LCLIntf, TypInfo, LCLProc,{$IFDEF UNIX}SysUtilsAdds,{$ENDIF} LR_View, LR_Pars, LR_Intrp, LR_DSet, LR_DBSet, LR_DBRel, LR_Const; As you can see, this includes a lot of the LCL units, and they depend on X through the widgetset. Yes, I know about the no_gui widgetset, but if you use that, you'll get a bunch of errors because of missing functionality (pagewidth/height missing or zero, no font info etc.). Lazreport inherited from fastreport a totally misplaced dependency on the GUI, unfortunately :/ For desktop apps, this is perfectly OK. But not for web apps. Michael.

You can use a combination of powerpdf with pascal script and a set of intermediate helper classes.

Boguslaw

Michael Van Canneyt
to Bogusław Brandys
Bogus?aw Brandys wrote 31 lines
> interface > > {$I LR_Vers.inc} > > uses > SysUtils, Classes, MaskUtils, Controls, FileUtil, Forms, ComCtrls, > Dialogs, > Menus, Variants, DB, Graphics, Printers, osPrinters, DOM, XMLRead, > XMLConf, LCLType, > LCLIntf, TypInfo, LCLProc,{$IFDEF UNIX}SysUtilsAdds,{$ENDIF} LR_View, > LR_Pars, > LR_Intrp, LR_DSet, LR_DBSet, LR_DBRel, LR_Const; > > As you can see, this includes a lot of the LCL units, and they depend on X > through the widgetset. > > Yes, I know about the no_gui widgetset, but if you use that, you'll get a > bunch of errors because of missing functionality (pagewidth/height missing > or zero, no font info etc.). > > Lazreport inherited from fastreport a totally misplaced dependency on the > GUI, unfortunately :/ > > For desktop apps, this is perfectly OK. But not for web apps. > > Michael. > You can use a combination of powerpdf with pascal script and a set of intermediate helper classes.

That is definitely an option.

Michael.

Lee Jenkins
to Michael Van Canneyt: the basic unit of lazreport is lr_class: unit LR_Class; interface {$I LR_Vers.inc} uses…
Michael Van Canneyt wrote 13 lines
As you can see, this includes a lot of the LCL units, and they depend on X through the widgetset. Yes, I know about the no_gui widgetset, but if you use that, you'll get a bunch of errors because of missing functionality (pagewidth/height missing or zero, no font info etc.). Lazreport inherited from fastreport a totally misplaced dependency on the GUI, unfortunately :/ For desktop apps, this is perfectly OK. But not for web apps.

OK. The reporting engine itself requires LCL and not just the preview/viewer portions. Make sense, being based on FreeReport which didn't make sense to abstract out the engine because Windows<->GUI is always there.

PowerPDF is pretty decent otherwise.

Thanks Michael,

Warm Regards, Lee
hector fiandor
to Jesus Reyes: --- El lun 23-ago-10, Lee Jenkins escribi?: LazReport reports can be exported to PDF…

Estimado Reyes:

como siempre, mis mejores deseos para usted y su familia.

casi me doy por vencido. he leido no menos de 20 veces la documentacion del lazreport, pero no encuentro donde esta mi error.

le estoy adjuntado un problema peque?o que hize para ver si trabajaba bien, pero nada. Me cuesta trabajo escribir el total en el Summary Report. (mejor dicho, no lo logro).

espero que para usted, sin apuro, cuando pueda, le tire un vistazo al problemita y me diga como resolverlo.

saludos,

Ing. H?ctor F. Fiandor Rosario

Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/ -------------- next part -------------- A non-text attachment was scrubbed... Name: zReporte para JReyes.rar Type: application/octet-stream Size: 9453 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100825/f2a0fc0c/attachment-0001.obj>
hector fiandor
to Jesus Reyes: --- El lun 23-ago-10, Lee Jenkins escribi?: LazReport reports can be exported to PDF…

Estimado Reyes:

ante todo mis saludos.

ya logre algo mejor que lo anterior.
leo un fichero de datos, llevo la informacion a un Record y despues hago el Reporte.
no se dar el Eof y tuve que agregar un fantasma para que trabajara bien

pero no se obtener la suma al final del reporte.

quisiera aprender mas para escribir lo aprendido y si le sirve a alguien, que no pase tanto trabajo como yo. que si no fuera por su ayuda, estaria frito.

saludos y le pido mil perdones, recuerde que no hay apuro.

Ing. H?ctor F. Fiandor Rosario

Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/ -------------- next part -------------- A non-text attachment was scrubbed... Name: zReporte para JReyes.rar Type: application/octet-stream Size: 8489 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100826/3c3d2be9/attachment.obj>