Welcome, Guest
Username: Password: Remember me
Components and Libraries for Database Development, discussions, problems and suggestions
  • Page:
  • 1

TOPIC:

LazReport: FRP version 28 failed to Open 9 years 3 weeks ago #7133

  • Luca
  • Luca's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 33
  • Thank you received: 2
Hi.
I created some reports with Laz Report included in CT 5.20. From Preview I saved them as FRP files.
Version of files is 28.
In CT 5.30 I cannot open them.
Program stopped in LR_Class row 8954, because frCreateObject(b, s, P^.Page) return nil when is called using following parameter:
b = 101
s = ''
If I save FRP from CT 5.30 no problem even if I cannot open them from CT 5.20.
Regards
Luca

Please Log in or Create an account to join the conversation.

LazReport: FRP version 28 failed to Open 9 years 3 weeks ago #7134

  • Luca
  • Luca's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 33
  • Thank you received: 2
Just to say I probably found the problem.

In Laz Report included in CT 5.30 a new property named ParagraphGap has been added to TfrCustomMemoView.
The value is readed from stream if version > 26 (row 4400):
if frVersion>26 then
    begin
      Stream.Read(FCursor, SizeOf(FCursor));
      frReadMemo(Stream, FOnClick);
      frReadMemo(Stream, FOnMouseEnter);
      frReadMemo(Stream, FOnMouseLeave);
      FDetailReport:=frReadString(Stream);
      Stream.Read(FParagraphGap, SizeOf(FParagraphGap));
    end;   

The code included in CT 5.20 is:
    if frVersion>26 then
    begin
      Stream.Read(FCursor, SizeOf(FCursor));
      frReadMemo(Stream, FOnClick);
      frReadMemo(Stream, FOnMouseEnter);
      frReadMemo(Stream, FOnMouseLeave);
      FDetailReport:=frReadString(Stream);
    end; 
So the stream reading point is moved on and this create the issue.
If I comment the Stream.Read... row all is fine to maintain backward compatiblity but this create a problem opening report created with CT 5.30.
Regards

Please Log in or Create an account to join the conversation.

LazReport: FRP version 28 failed to Open 9 years 3 weeks ago #7137

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4518
  • Thank you received: 1102
Thanks Sir
we will check and fix this
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

  • Page:
  • 1