Recent

Author Topic: fpreport manual  (Read 853 times)

Bobito

  • New Member
  • *
  • Posts: 19
fpreport manual
« on: November 30, 2019, 10:45:00 pm »
Hello everyone.
I have downloaded and installed i-win32-win32/win64 Lazarus Trunk Version 2.1, Date 2019-11-09 svn revision 62218, FPC 3.3.1 on Windows 7, and i also installed fpreport.

I'm trying some reports with fpreport. I have used lazreport before and been able to pass parameters by means of the OnGetValue event, but that event is not available with fpreport. These are the events available in fpreport: OnAfterRenderReport, OnBeforeRenderReport, OnBeginReport and OnEndReport.
Should I try OnBeforeRenderReport to pass parameters?
Is there a complete manual for fpreport somewhere?
Thank you all for your help.


dsiders

  • Full Member
  • ***
  • Posts: 238
Re: fpreport manual
« Reply #1 on: November 30, 2019, 11:09:48 pm »
Hello everyone.
I have downloaded and installed i-win32-win32/win64 Lazarus Trunk Version 2.1, Date 2019-11-09 svn revision 62218, FPC 3.3.1 on Windows 7, and i also installed fpreport.

I'm trying some reports with fpreport. I have used lazreport before and been able to pass parameters by means of the OnGetValue event, but that event is not available with fpreport. These are the events available in fpreport: OnAfterRenderReport, OnBeforeRenderReport, OnBeginReport and OnEndReport.
Should I try OnBeforeRenderReport to pass parameters?
Is there a complete manual for fpreport somewhere?
Thank you all for your help.

I have stumbled across the following:

https://wiki.freepascal.org/FPReport
https://wiki.freepascal.org/FPReport_Usage
https://wiki.freepascal.org/FPReport_FAQ

Lazarus 2.0.4 / FPC 3.0.4 / Windows 8.1 64-bit

wp

  • Hero Member
  • *****
  • Posts: 6471
Re: fpreport manual
« Reply #2 on: December 01, 2019, 12:29:21 am »
This chapter of the FAQ (https://wiki.freepascal.org/FPReport_FAQ#I_cannot_compile_the_FPReport_packages) says that FPReport does no longer compile on Laz/64 bit since Jan 2019.

Is this still true, almost one year later?

It would be better if such observations would be submitted to bugtracker so that the maintainer can take care of it because he certainly will not take notice of this message.
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

af0815

  • Sr. Member
  • ****
  • Posts: 387
Re: fpreport manual
« Reply #3 on: December 01, 2019, 03:10:55 pm »
Fresh Lazarus 2.1.0 r62315 FPC 3.2.0 x86_64-win64-win32/win64 from today

I think it looks true, with a fresh install of fpc fixes32 and Lazarus trunk.

Quote
Free Pascal Compiler version 3.2.0-beta-r43619 [2019/12/01] for x86_64
Copyright (c) 1993-2018 by Florian Klaempfl and others
(1002) Target OS: Win64 for x64
(3104) Compiling lclfpreport.pas
(3104) Compiling cfgfpreportimageexport.pp
D:\data\lazdev\work64ft\lazarus\components\fpreport\cfgfpreportimageexport.pp(24,42) Fatal: (10022) Can't find unit fpreport used by cfgfpreportimageexport
Fatal: (1018) Compilation aborted
Error: X:\data\lazdev\work64ft\fpc\bin\x86_64-win64\ppcx64.exe returned an error exitcode

something is wrong with the package fcl-report in FPC. It is not built by default. In Makefile.fpc.fpcmake it is not found, nor in Makefile.fpc
But it is found in fpmake_proc.inc around line 794.
« Last Edit: December 01, 2019, 03:15:44 pm by af0815 »
regards
Andreas

af0815

  • Sr. Member
  • ****
  • Posts: 387
Re: fpreport manual
« Reply #4 on: December 01, 2019, 03:28:23 pm »
I'm trying some reports with fpreport. I have used lazreport before and been able to pass parameters by means of the OnGetValue event, but that event is not available with fpreport. These are the events available in fpreport: OnAfterRenderReport, OnBeforeRenderReport, OnBeginReport and OnEndReport.
Should I try OnBeforeRenderReport to pass parameters?
Is there a complete manual for fpreport somewhere?
Thank you all for your help.
The is a good Demo in lazarus\examples\fpreport\simple :-) Look here to found some questions answered. The OnGetValue event is here in TFPReportUserData, because report gerneration and renderer are split into two seperate parts. But you see this in the demo, look in CreateDemoReport.
regards
Andreas

af0815

  • Sr. Member
  • ****
  • Posts: 387
Re: fpreport manual
« Reply #5 on: December 02, 2019, 10:34:27 pm »
@wp - i have filed a bug 0036394, because it is true on a fresh installation fcl-report is not built by default.

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

it is fixed in svn 43630 with a simple line change :-) im the fpmake.pp of fcl-report
Quote
Index: fpmake.pp
===================================================================
--- fpmake.pp   (revision 43629)
+++ fpmake.pp   (revision 43630)
@@ -31,7 +31,7 @@
     P.Email := '';
     P.Description := 'GUI-independent Reporting Engine';
     P.NeedLibC:= false;
-    P.OSes:=[linux, win32, darwin, freebsd];
+    P.OSes:=[linux, win32, win64, darwin, freebsd];
     P.SourcePath.Add('src');
 {$IFDEF VER2_6}   
     T:=P.Targets.AddUnit('fprepexprpars.pp');
« Last Edit: December 03, 2019, 04:55:00 pm by af0815 »
regards
Andreas