Recent

Author Topic: calculating values in fpreport  (Read 1780 times)

Pascal

  • Hero Member
  • *****
  • Posts: 886
Re: calculating values in fpreport
« Reply #15 on: January 08, 2020, 10:08:12 am »
With the decision of MvC here (https://bugs.freepascal.org/view.php?id=36525) ist looks impossible to use the fpexpression in the fpreport for calculating of aggregations and grouping on an non english configured system. On a german system the decimal seperator is a comma not a dot. If data is sent to fpexpression it must be converted to a non system standard value to be aggregated. The same problem i have found in the tests of fpreport, because the Formatsettings sometimes not handled
Looking in the fcl-report/src directory I found a unit fprexprpars which is more or less a copy of the standard fpexprpars unit (note the additional "r" behind the "fp"); this was probably needed to provide dedicated adjustments of the parser for the report engine which should not be used in the standard parser. Maybe MvC changes his mind when the patch of the bug report is modified to apply to fprexprpars, not to fpexprpars?

Can't find it! Did you mix it up with fprepexprpars, which is used for fpc versions below 030101?
It is in the official sources of fpc trunk: https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/fcl-report/src/fprepexprpars.pp?view=log. If it is not needed any more it should be removed.

So fprepexprpars and not fprexprpars. It's still needed for fpc versions prior 030101. See fpreport.pas:

Code: Pascal  [Select][+][-]
  1. uses
  2.   Classes,
  3.   SysUtils,
  4.   Variants,
  5.   contnrs,
  6.   fpCanvas,
  7.   fpImage,
  8.   fpTTF,
  9.   fpreportstreamer,
  10. {$IF FPC_FULLVERSION>=30101}
  11.   fpexprpars,
  12. {$ELSE}
  13.   fprepexprpars,
  14. {$ENDIF}
  15.   fpReportHTMLParser;
  16.  
laz trunk - fpc trunk 32bit - Windows 10 Pro x64 (1909)

wp

  • Hero Member
  • *****
  • Posts: 7353
Re: calculating values in fpreport
« Reply #16 on: January 08, 2020, 10:27:26 am »
OK, then my remarks in reply #11 are obsolete.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

 

TinyPortal © 2005-2018