Sign in Join

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

Mailing lists / lazarus / 2017-09

fpReport - can not render pagefooter

13 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Andreas Frieß

i have extracted a small sample for fpReport and Lazarus. But i have trouble to declare a working Pagefooter. The Pagefooter is defined, but not shown after the rendering. Not in LCLrendering, LCLpreview nor in the PDF.

The CreateDemoReport is extracted from the fpreportdesigner, so i think this is well tested :-) by graeme.

What is my mistake of understanding ?

Andreas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: published.zip
Type: application/x-zip-compressed
Size: 4987 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170927/15e68e40/attachment.bin>

Reply by email

Graeme Geldenhuys
to Andreas Frieß
Andreas Frieß wrote
What is my mistake of understanding ?

You made a couple of mistakes and highlighted a bug in the PDF exporter.

Mistakes:

1.  You never registered the standard page sizes with:
          PaperManager.RegisterStandardSizes;

2. Your report used LiberationSans font. Make sure you added the search paths to the font cache. eg:

           {$IFDEF UNIX}
             gTTFontCache.SearchPath.Add(GetUserDir + '.fonts/');
gTTFontCache.SearchPath.Add('/data/devel/Wisa/fonts/Liberation/');
           {$ENDIF}

3. You positioned a lot of reporting elements overlapping each other. Correct positioning will help you see things better. ;-)

Bug:

The PDF exporter didn't handle Page.Orientation of Landscape correctly, and rendered such pages from the bottom upwards. I supplied a patch to FPC's Mantis so hopefully Michael or somebody could commit that soon.

https://bugs.freepascal.org/view.php?id=32478

After all that, the report renders just fine.

ps:
Note that I compiled your project using the latest fpReport from FPC Trunk. I simply set the correct Unit Source Path in the project. You don't need to use FPC Trunk compiler - I used FPC 2.6.4.

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 Graeme Geldenhuys
Graeme Geldenhuys wrote 34 lines
On 2017-09-27 09:38, Andreas Frieß via Lazarus wrote: > What is my mistake of understanding ? You made a couple of mistakes and highlighted a bug in the PDF exporter. Mistakes: 1. You never registered the standard page sizes with: PaperManager.RegisterStandardSizes; 2. Your report used LiberationSans font. Make sure you added the search paths to the font cache. eg: {$IFDEF UNIX} gTTFontCache.SearchPath.Add(GetUserDir + '.fonts/'); gTTFontCache.SearchPath.Add('/data/devel/Wisa/fonts/Liberation/'); {$ENDIF} 3. You positioned a lot of reporting elements overlapping each other. Correct positioning will help you see things better. ;-) Bug: The PDF exporter didn't handle Page.Orientation of Landscape correctly, and rendered such pages from the bottom upwards. I supplied a patch to FPC's Mantis so hopefully Michael or somebody could commit that soon. https://bugs.freepascal.org/view.php?id=32478 After all that, the report renders just fine.

Patch Applied, thanks for the fix!

Michael.

Reply by email

Andreas Frieß
to Graeme Geldenhuys: You made a couple of mistakes and highlighted a bug in the PDF exporter. Mistakes: 1. …

THX Graeme

In windows this is possible and running: -> I have my sample extended

procedure TForm1.FormActivate(Sender: TObject);
begin
   if not FInit then begin
     gTTFontCache.ReadStandardFonts;
     gTTFontCache.BuildFontCache;
     if PaperManager.PaperCount=0 then
       PaperManager.RegisterStandardSizes;
     FInit:= true;
   end;
end;

The problem with fontcache, is not (maybe direct) visible in the demo on FPReport Usage.

BTW: point 3 -> the code is copied direct from the 'designer' :-) not made on my own - lol.

Bugreport for the designer problem with orientation is 32470, i will check this and close if running.

Andreas

Graeme Geldenhuys wrote 45 lines
On 2017-09-27 09:38, Andreas Frieß via Lazarus wrote: > What is my mistake of understanding ? You made a couple of mistakes and highlighted a bug in the PDF exporter. Mistakes: 1.  You never registered the standard page sizes with:          PaperManager.RegisterStandardSizes; 2.  Your report used LiberationSans font. Make sure you added     the search paths to the font cache. eg:           {$IFDEF UNIX}             gTTFontCache.SearchPath.Add(GetUserDir + '.fonts/'); gTTFontCache.SearchPath.Add('/data/devel/Wisa/fonts/Liberation/');           {$ENDIF} 3.  You positioned a lot of reporting elements overlapping each     other. Correct positioning will help you see things better. ;-) Bug:    The PDF exporter didn't handle Page.Orientation of Landscape    correctly, and rendered such pages from the bottom upwards.    I supplied a patch to FPC's Mantis so hopefully Michael or    somebody could commit that soon.       https://bugs.freepascal.org/view.php?id=32478 After all that, the report renders just fine. ps:   Note that I compiled your project using the latest fpReport from   FPC Trunk. I simply set the correct Unit Source Path in the project.   You don't need to use FPC Trunk compiler - I used FPC 2.6.4. Regards,   Graeme

Reply by email

Andrea Mauri
to Graeme Geldenhuys: You made a couple of mistakes and highlighted a bug in the PDF exporter. Mistakes: 1. …

Il 27/09/2017 12:50, Graeme Geldenhuys via Lazarus ha scritto:

ps: Note that I compiled your project using the latest fpReport from FPC Trunk. I simply set the correct Unit Source Path in the project. You don't need to use FPC Trunk compiler - I used FPC 2.6.4.

What are the minimum requirements to use fpreport? Can I use it with laz 1.6.2 and fpc 3.0.0?
I downloaded both fcl-report and fpreport.
I tried to install fpreport but I failed.
Any hint?

Reply by email

Michael Van Canneyt
to Andrea Mauri
Andrea Mauri wrote 10 lines
Il 27/09/2017 12:50, Graeme Geldenhuys via Lazarus ha scritto: > ps: > Note that I compiled your project using the latest fpReport from > FPC Trunk. I simply set the correct Unit Source Path in the project. > You don't need to use FPC Trunk compiler - I used FPC 2.6.4. What are the minimum requirements to use fpreport? Can I use it with laz 1.6.2 and fpc 3.0.0? I downloaded both fcl-report and fpreport. I tried to install fpreport but I failed.

Normally you can, but you will need to copy some additional units from the trunk version of the FPC source repo (in particular, fpexprpars, and fcl-pdf)

fpReport is in production use with 2.6.4 as the compiler.

Michael.

Reply by email

Andrea Mauri
to Michael Van Canneyt

Il 28/09/2017 12:15, Michael Van Canneyt via Lazarus ha scritto:

Show quoted text 5 lines
Normally you can, but you will need to copy some additional units from the trunk version of the FPC source repo (in particular, fpexprpars, and fcl-pdf) fpReport is in production use with 2.6.4 as the compiler.

I downloaded fcl-report, fcl-pdf, fpexprpars from FPC trunk and fpreport. When I try to compile lclfpreport package I got:
cfgfpreportimageexport.pp(24,42) Fatal: Cannot find fpreport used by cfgfpreportimageexport of package lclfpreport.

Reply by email

Michael Van Canneyt
to Andrea Mauri
Andrea Mauri wrote 11 lines
Il 28/09/2017 12:15, Michael Van Canneyt via Lazarus ha scritto: > Normally you can, but you will need to copy some additional units from the > trunk version of the FPC source repo (in particular, fpexprpars, and > fcl-pdf) > > fpReport is in production use with 2.6.4 as the compiler. I downloaded fcl-report, fcl-pdf, fpexprpars from FPC trunk and fpreport. When I try to compile lclfpreport package I got: cfgfpreportimageexport.pp(24,42) Fatal: Cannot find fpreport used by cfgfpreportimageexport of package lclfpreport.

Sounds like a misconfigured path.
Hard to debug, because there is also the 8.3 filename support that interferes. How I cursed that while developing fpreport !! :/

Michael.

Reply by email

Graeme Geldenhuys
to Andrea Mauri: Il 27/09/2017 12:50, Graeme Geldenhuys via Lazarus ha scritto: What are the minimum…
Andrea Mauri wrote
What are the minimum requirements to use fpreport? Can I use it with laz 1.6.2 and fpc 3.0.0?

I don't track the lazarus version I use, but I'm using fpreport (from FPC Trunk) with FPC 2.6.4.

On a side note:
I did notice recently that there was some FPC Trunk changes of fpReport that breaks FPC 2.6.4 support, but it was a single IFDEF to fix the issue locally. I'll submit a patch for that tomorrow on Mantis.

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ß

Sure.

You can add pages to the wiki about fpreport:

http://wiki.freepascal.org/FPReport

I suggest adding a new page

http://wiki.freepascal.org/FPReport_FAQ

and linking to it from the main page.
But don't add the FAQ directly in the main page itself.

Michael.

Andreas Frieß wrote 22 lines
Is it possible to make a FAQ for fpreport ? Regards Andreas Graeme Geldenhuys via Lazarus wrote: > On 2017-09-27 09:38, Andreas Frieß via Lazarus wrote: >> What is my mistake of understanding ? > > You made a couple of mistakes and highlighted a bug in the PDF > exporter. > > Mistakes: > ... > > Regards, > Graeme

Reply by email