Recent

Author Topic: [Solved] FortesReport CE won't compile with Lazarus 2.0.10-fpc 3.2.0  (Read 2594 times)

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
I just did a clean install of Lazarus 2.0.10 - FPC 3.2.0 and now package Fortesreport CE will not compile anymore.
Quote
Compile package frce 4.0: Exit code 1, Errors: 2, Warnings: 2
RLMetaVCL.pas(305,18) Error: range check error while evaluating constants (3 must be between 0 and 2)
RLMetaVCL.pas(508,41) Error: range check error while evaluating constants (3 must be between 0 and 2)

It did compile with previous FPC version 3.0.4, any ideas on how to solve this?
« Last Edit: July 24, 2020, 05:27:43 pm by JanRoza »
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

aschaon

  • Newbie
  • Posts: 2
Re: FortesReport CE won't compile with Lazarus 2.0.10-fpc 3.2.0
« Reply #1 on: July 24, 2020, 02:08:59 pm »
Confirmed.
The problem seems to be a change in range check error or the succ function.
The TAlignment = (taLeftJustify, taRightJustify, taCenter), so succ(taCenter) should become the first element: taLeftJustify, not the third unexisting element. I think the succ(taCenter) was introduced so other alignments could be used (like justify) when they become available.

I think replacing succ(taCenter) with taLeftJustify should work as short term solution.

Code: Pascal  [Select][+][-]
  1.  //MetaTextAlignmentJustify: Result := succ(taCenter);
  2.     MetaTextAlignmentJustify: Result := taLeftJustify;
  3.  
  4. //if ASource = succ(taCenter) then
  5.     if ASource = taLeftJustify then

Tested it, compiles and runs.
« Last Edit: July 24, 2020, 02:25:39 pm by aschaon »

aschaon

  • Newbie
  • Posts: 2
Re: FortesReport CE won't compile with Lazarus 2.0.10-fpc 3.2.0
« Reply #2 on: July 24, 2020, 02:59:33 pm »
Fixed version of Fortes Report CE available which fixes this and other errors.
https://github.com/fortesinformatica/fortesreport-ce

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: FortesReport CE won't compile with Lazarus 2.0.10-fpc 3.2.0
« Reply #3 on: July 24, 2020, 05:26:29 pm »
I found it and all is well now.
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

Jvan

  • Full Member
  • ***
  • Posts: 181
Re: FortesReport CE won't compile with Lazarus 2.0.10-fpc 3.2.0
« Reply #4 on: August 03, 2020, 06:01:06 am »
Fixed version of Fortes Report CE available which fixes this and other errors.
https://github.com/fortesinformatica/fortesreport-ce

I have these problems: "List index out of bounds (-1)"


JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: [Solved] FortesReport CE won't compile with Lazarus 2.0.10-fpc 3.2.0
« Reply #5 on: August 03, 2020, 02:38:14 pm »
How did you install the package?
All I did was download the new version from github, copied it over the existing package and compiled and installed that version via the lpk file.
Rebuild Lazarus and all was well without any errors.
I do not recognize the screenshots you show, but the definitely do not appear if you install as I mentioned above.
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

Jvan

  • Full Member
  • ***
  • Posts: 181
Re: [Solved] FortesReport CE won't compile with Lazarus 2.0.10-fpc 3.2.0
« Reply #6 on: August 03, 2020, 04:04:32 pm »
How did you install the package?
All I did was download the new version from github, copied it over the existing package and compiled and installed that version via the lpk file.
Rebuild Lazarus and all was well without any errors.
I do not recognize the screenshots you show, but the definitely do not appear if you install as I mentioned above.

I just tried your suggestion, but now I'm having this error message:

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: [Solved] FortesReport CE won't compile with Lazarus 2.0.10-fpc 3.2.0
« Reply #7 on: August 03, 2020, 10:55:51 pm »
That means you previously tried to install Fortesreport 3.24 and never uninstalled it, uninstall this via the package menu - Install/Uninstall packages.
Then rebuild Lazarus IDE.
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

 

TinyPortal © 2005-2018