Sign in Join

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

Mailing lists / lazarus / 2017-08

fpReport released

17 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Michael Van Canneyt

Hello,

A long time wait. But it finally made it:

fpreport has been committed to FPC SVN: packages/fcl-report. It should compile on windows, linux, freebsd and darwin.

Features and architecture are described on:
http://wiki.freepascal.org/FPReport

Short highlights:
- Banded report design.
- Streaming to JSON, streaming XML is on TODO.
- Expressions using fpexprpars.
- No GUI Dependencies.
- Unit tested.
- Standard support for Memo (with HTML tags embedded), image, shape and checkbox elements
- Data loop for Dataset, JSON data, collections, lists, event driven.
- Framework for extending with other elements (demo contains polygon).
- Export out of the box to following format:
- Pure HTML.
(TOC pages, optional use of frames, highly configurable)
- Images (with option to generate HTML container pages. Currently requires FreeType on windows)
- PDF (using fcl-pdf)

There are 11 demo reports in a command-line.
There is also a standalone webdemo with the same demos, which shows that fpreport can be used very easily in a headless webserver.

The LCL support has been committed to lazarus: components/fpreport. It contains:
- Preview (export to LCL canvas)
- Printing.
- Design-time support for a report.
- Stand-alone designer, with support for accessing data from: CSV, DBF, SQLDB, JSON File, any REST service that exports JSON. Allows preview and export to all known formats.
- LCL demo program.

Todo:
- XML
- Remove freetype dependency.
- subreport.
- crosstab.
- chart support.

Exporters for FPGUI and AggPas are also available, I expect that Graeme Geldenhuys will commit them soon.

Please remember, this is a first release. There are some known bugs and shortcomings. Feel free to report anything you find in the bugtracker, suggestions are also welcome.

Enjoy,

Michael.
[5~

Reply by email

Michael W. Vogel
to Michael Van Canneyt
Michael Van Canneyt wrote
fpreport has been committed to FPC SVN: packages/fcl-report. It should compile on windows, linux, freebsd and darwin.

I just tried to compile a clean fpc:
make distclean
make all install INSTALL_PREFIX=%FpcPath%
PP=%BootStrapCompilerPath%\ppc386.exe

I got this error:

Start compiling package fcl-report for target i386-win32. Compiling fcl-report\BuildUnit_fcl_report.pp
Compiling .\fcl-report\src\fpreportstreamer.pp
Compiling .\fcl-report\src\fpreporthtmlparser.pp
Compiling .\fcl-report\src\fpreport.pp
Compiling .\fcl-report\src\fpjsonreport.pp
Compiling .\fcl-report\src\fpreportjson.pp
Compiling .\fcl-report\src\fpreportdb.pp
External command "c:/32fpc311/fpc/compiler/ppc386.exe -Twin32 -FUfcl-report\unit
s\i386-win32\ -Fuc:\32fpc311\fpc\rtl\units\i386-win32\ -Fuc:\32fpc311\fpc\packag
es\fcl-base\units\i386-win32\
-Fuc:\32fpc311\fpc\packages\fcl-res\units\i386-win 32\ -Fuc:\32fpc311\fpc\packages\rtl-objpas\units\i386-win32\ -Fuc:\32fpc311\fpc\
packages\fcl-image\units\i386-win32\
-Fuc:\32fpc311\fpc\packages\pasjpeg\units\i
386-win32\ -Fuc:\32fpc311\fpc\packages\paszlib\units\i386-win32\ -Fuc:\32fpc311\
fpc\packages\hash\units\i386-win32\
-Fuc:\32fpc311\fpc\packages\fcl-xml\units\i3
86-win32\ -Fuc:\32fpc311\fpc\packages\fcl-pdf\units\i386-win32\ -Fuc:\32fpc311\f
pc\packages\fcl-json\units\i386-win32\ -Fufcl-report\src -Ur -Xs -O2 -n -di386 -
dRELEASE -XX -CX -viq fcl-report\BuildUnit_fcl_report.pp" failed with exit code
1. Console output:
Target OS: Win32 for i386
Compiling fcl-report\BuildUnit_fcl_report.pp
Compiling .\fcl-report\src\fpreportstreamer.pp
Writing Resource String Table file: fpreportstreamer.rsj Compiling .\fcl-report\src\fpreporthtmlparser.pp
Compiling .\fcl-report\src\fpreport.pp
Writing Resource String Table file: fpreport.rsj
Compiling .\fcl-report\src\fpjsonreport.pp
Writing Resource String Table file: fpjsonreport.rsj Compiling .\fcl-report\src\fpreportjson.pp
Writing Resource String Table file: fpreportjson.rsj Compiling .\fcl-report\src\fpreportdb.pp
fpreportdb.pp(22,32) Fatal: Can't find unit db used by fpreportdb Fatal: Compilation aborted

The installer encountered the following error:
Compilation of "BuildUnit_fcl_report.pp" failed
make[2]: *** [smart] Error 1
make[2]: Leaving directory `c:/32fpc311/fpc/packages' make[1]: *** [packages_smart] Error 2
make[1]: Leaving directory `c:/32fpc311/fpc'
make: *** [build-stamp.i386-win32] Error 2

Michl

Reply by email

Michael Van Canneyt
to Michael W. Vogel
Michael W. Vogel wrote 7 lines
Am 20.08.2017 um 20:35 schrieb Michael Van Canneyt via Lazarus: > fpreport has been committed to FPC SVN: packages/fcl-report. > It should compile on windows, linux, freebsd and darwin. I just tried to compile a clean fpc: fpreportdb.pp(22,32) Fatal: Can't find unit db used by fpreportdb Fatal: Compilation aborted

Missing dependency. I added it, please update and try again.

No idea why this always happens to me.
I do a "make clean all" and it just works :/

Michael.

Reply by email

Andreas Frieß
to Michael Van Canneyt: Missing dependency. I added it, please update and try again. No idea why this always…

Thx Michael & Graeme for the fcl-report.

But is there a fcl-report package for Lazarus, because the web-demo asked me for ? Or should be an extra package for Lazarus planned ?

Andreas

Michael Van Canneyt wrote 18 lines
On Sun, 20 Aug 2017, Michael W. Vogel via Lazarus wrote: > Am 20.08.2017 um 20:35 schrieb Michael Van Canneyt via Lazarus: >> fpreport has been committed to FPC SVN: packages/fcl-report. >> It should compile on windows, linux, freebsd and darwin. > > I just tried to compile a clean fpc: > fpreportdb.pp(22,32) Fatal: Can't find unit db used by fpreportdb > Fatal: Compilation aborted Missing dependency. I added it, please update and try again. No idea why this always happens to me. I do a "make clean all" and it just works :/ Michael.

Reply by email

Graeme Geldenhuys
to Andreas Frieß
Andreas Frieß wrote
But is there a fcl-report package for Lazarus, because the web-demo asked me for ? Or should be an extra package for Lazarus planned ?

There definitely was a fclfpreport.lpk package and the demo had a dependency on that. This was when everything was in a single reporting repository though. Maybe because of the repository split (FPC, Lazarus and fpGUI) things got lost along the way. I'll have to get a Lazarus repo update to double check what Michael committed in there.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Andreas Frieß
to Graeme Geldenhuys: There definitely was a fclfpreport.lpk package and the demo had a dependency on that.…

Thx Graeme, i some changes in the Lazarus trunk now too. I didnt reconiced this on Lazarus, because i'm actually on the 1.8RC path :-)

But i can backport this :-) Sorry for my noise.

Andreas

Graeme Geldenhuys wrote 13 lines
On 2017-08-20 21:05, Andreas Frieß via Lazarus wrote: > But is there a fcl-report package for Lazarus, because the web-demo > asked me for ? Or should be an extra package for Lazarus planned ? There definitely was a fclfpreport.lpk package and the demo had a dependency on that. This was when everything was in a single reporting repository though. Maybe because of the repository split (FPC, Lazarus and fpGUI) things got lost along the way. I'll have to get a Lazarus repo update to double check what Michael committed in there. Regards, Graeme

Reply by email

Graeme Geldenhuys
to Andreas Frieß: If i want to start the demo in windows, some dll's are missing. The freetype dll searched…
Andreas Frieß wrote
The freetype dll searched by the fpreport was freetype-6.dll, but the actual freetype-2.3.5-1-bin.zip has only a freetype6.dll. (Renaming is not a problem for me)

It seems FreeType has some inconsistencies with its releases and naming of the DLL. I have copies of freetype-6.dll, freetype6.dll and freetype.dll - all version 6 and all downloaded from somewhere on the Internet.

I guess the one good thing is that there is a fpReport TODO item to remove the freetype*.dll dependencies for Windows in the future. That is already possible with the AggPas exporter, but in that specific case I prefer the freetype usage as it generates better text via AggPas and has more features that the Windows Font API supports.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Michael Van Canneyt
to Andreas Frieß: Thx Michael & Graeme for the fcl-report. But is there a fcl-report package for Lazarus,…
Andreas Frieß wrote
Thx Michael & Graeme for the fcl-report. But is there a fcl-report package for Lazarus, because the web-demo asked me for ? Or should be an extra package for Lazarus planned ?

This is an old package from when the sources were in a separate repo. It is no longer needed. I removed the dependency.

BTW. All code should definitely compile with 3.0.2 or later, and if you collect all sources that make up the various parts, the core engine and exporters should work even with 2.6.4.

Michael.

Reply by email

Andreas Frieß
to Graeme Geldenhuys: It seems FreeType has some inconsistencies with its releases and naming of the DLL. I…

I'm on Win10 Pro/64 1703. The needed fonts are not found by the program, because they are not in my system (%windir%/fonts). In fpTTF only the WinDir is added to the searchlist. So an Exception is raised and the execution of the lcldemo stops here. The fonts are in the fcl-report/demos/fonts.

Regards

Andreas

Graeme Geldenhuys wrote 19 lines
On 2017-08-20 21:16, Andreas Frieß via Lazarus wrote: > The freetype dll searched by the fpreport was freetype-6.dll, but the > actual freetype-2.3.5-1-bin.zip has only a freetype6.dll. (Renaming is > not a problem for me) It seems FreeType has some inconsistencies with its releases and naming of the DLL. I have copies of freetype-6.dll, freetype6.dll and freetype.dll - all version 6 and all downloaded from somewhere on the Internet. I guess the one good thing is that there is a fpReport TODO item to remove the freetype*.dll dependencies for Windows in the future. That is already possible with the AggPas exporter, but in that specific case I prefer the freetype usage as it generates better text via AggPas and has more features that the Windows Font API supports. Regards, Graeme

Reply by email

Michael Van Canneyt
to Andreas Frieß
Andreas Frieß wrote 5 lines
I'm on Win10 Pro/64 1703. The needed fonts are not found by the program, because they are not in my system (%windir%/fonts). In fpTTF only the WinDir is added to the searchlist. So an Exception is raised and the execution of the lcldemo stops here. The fonts are in the fcl-report/demos/fonts.

The demos are normally adding the current dir+fonts to the search path. udapp line 241.

Michael.

Reply by email

Ondrej Pokorny
to Graeme Geldenhuys: It seems FreeType has some inconsistencies with its releases and naming of the DLL. I…
Graeme Geldenhuys wrote 15 lines
On 2017-08-20 21:16, Andreas Frieß via Lazarus wrote: > The freetype dll searched by the fpreport was freetype-6.dll, but the > actual freetype-2.3.5-1-bin.zip has only a freetype6.dll. (Renaming is > not a problem for me) It seems FreeType has some inconsistencies with its releases and naming of the DLL. I have copies of freetype-6.dll, freetype6.dll and freetype.dll - all version 6 and all downloaded from somewhere on the Internet. I guess the one good thing is that there is a fpReport TODO item to remove the freetype*.dll dependencies for Windows in the future. That is already possible with the AggPas exporter, but in that specific case I prefer the freetype usage as it generates better text via AggPas and has more features that the Windows Font API supports.

I use my own reporting engine - very similar to fpReport (no GUI dependency, no DB dependency, XML-template based). I use fpTTF for getting font information for rendering. Can't you use it as well?

For LCL bitmap output (preview), I use EasyLazFreeType / TIntfFreeTypeDrawer directly to get a TLazIntfImage. No need for AggPas or other libraries.

What do you need freetype for?

Ondrej

Reply by email

Michael Van Canneyt
to Ondrej Pokorny
Ondrej Pokorny wrote 20 lines
On 21.08.2017 1:38, Graeme Geldenhuys via Lazarus wrote: > On 2017-08-20 21:16, Andreas Frieß via Lazarus wrote: >> The freetype dll searched by the fpreport was freetype-6.dll, but the >> actual freetype-2.3.5-1-bin.zip has only a freetype6.dll. (Renaming is >> not a problem for me) > > It seems FreeType has some inconsistencies with its releases and > naming of the DLL. I have copies of freetype-6.dll, freetype6.dll and > freetype.dll - all version 6 and all downloaded from somewhere on the > Internet. > > I guess the one good thing is that there is a fpReport TODO item to > remove the freetype*.dll dependencies for Windows in the future. That > is already possible with the AggPas exporter, but in that specific > case I prefer the freetype usage as it generates better text via > AggPas and has more features that the Windows Font API supports. I use my own reporting engine - very similar to fpReport (no GUI dependency, no DB dependency, XML-template based). I use fpTTF for getting font information for rendering. Can't you use it as well?

It is already used.

For LCL bitmap output (preview), I use EasyLazFreeType / TIntfFreeTypeDrawer directly to get a TLazIntfImage. No need for AggPas or other libraries.

Only if you use the LCL.

What do you need freetype for?

If you use the HTML or PDF rendering, you don't need it. If you want fpImage rendering, it is needed to actually render text. I'm working on having this dependency on freetype removed.

Michael.

Reply by email

Andreas Frieß
to Michael Van Canneyt: The demos are normally adding the current dir+fonts to the search path. udapp line 241.…

Thanks, its true for the app in fpc directory. So i have to look for the Lazarus Demos/Designer too.

Andreas

Michael Van Canneyt wrote 16 lines
On Mon, 21 Aug 2017, Andreas Frieß via Lazarus wrote: > I'm on Win10 Pro/64 1703. The needed fonts are not found by the > program, because they are not in my system (%windir%/fonts). In > fpTTF only the WinDir is added to the searchlist. So an Exception is > raised and the execution of the lcldemo stops here. The fonts are in > the fcl-report/demos/fonts. The demos are normally adding the current dir+fonts to the search path. udapp line 241. Michael.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170821/2cc76b80/attachment.html>

Reply by email

Graeme Geldenhuys
to Ondrej Pokorny: I use my own reporting engine - very similar to fpReport (no GUI dependency, no DB…
Ondrej Pokorny wrote
For LCL bitmap output (preview), I use EasyLazFreeType

Michael explained it all in his reply.

I would just like to add that the above EasyLazFreeType unit (if I remember correctly) is based on a very old Pascal implementation of FreeType v1. There are a ton of FreeType features not supported by that unit.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email