Recent

Author Topic: Problem with TlrSpreadSheetExport  (Read 977 times)

alpine

  • Hero Member
  • *****
  • Posts: 1067
Problem with TlrSpreadSheetExport
« on: December 22, 2022, 10:58:15 am »
I have dropped TlrSpreadSheetExport on a form and now I can't open any form inherited from it! The message is:
Quote
Only one TlrSpreadSheetExport component allowed.
See the attached picture.
Tried Run -> Clean up and build project with everything checked
Tried Tools -> Build Lazarus with profile: Normal IDE

Please advice!

Lazarus 2.2.2 (rev lazarus_2_2_2) FPC 3.2.2 i386-win32-win32/win64
"I'm sorry Dave, I'm afraid I can't do that."
—HAL 9000

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: Problem with TlrSpreadSheetExport
« Reply #1 on: December 22, 2022, 04:18:43 pm »
What do you mean by inherited forms?
As far as I no after including a lrSpreadsheetExport on your form, the only effect in a report(preview) is that you get the option to save the report in Excel or ODS format.
It only works for the reports you have included on your form.
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

alpine

  • Hero Member
  • *****
  • Posts: 1067
Re: Problem with TlrSpreadSheetExport
« Reply #2 on: December 22, 2022, 04:49:24 pm »
What do you mean by inherited forms?
As far as I no after including a lrSpreadsheetExport on your form, the only effect in a report(preview) is that you get the option to save the report in Excel or ODS format.
It only works for the reports you have included on your form.
I mean that I have a form and then another 10 forms that are created with File/New/Inherited Item/Inherited project component and the former form chosen as their ancestor. Thus, for example, the inherited form is:
Code: Pascal  [Select][+][-]
  1. type
  2.   TReportNUserActivityForm = class(TRestTableBaseForm)
  3.     ...
  4.   end;
  5.  
Placing TfrTextExport on the parent form is working fine - the component appears on all inherited forms and it works, but putting TlrSpreadSheetExport (also on the parent form) gives exception in designer when trying to open any inherited form. If I just build it - then the exception appears when I try to create any of the inherited forms.

That is not the case with other TfrXXXExport components.
"I'm sorry Dave, I'm afraid I can't do that."
—HAL 9000

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: Problem with TlrSpreadSheetExport
« Reply #3 on: December 23, 2022, 02:58:49 pm »
I see what you mean now.
As far as I am concerned all export packages of lazreport shouls work the same, maybe it is a bug in this specific export component?
Hopefully the maintainer of lazreport can shed some light on this problem.
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

alpine

  • Hero Member
  • *****
  • Posts: 1067
Re: Problem with TlrSpreadSheetExport
« Reply #4 on: December 29, 2022, 11:34:41 am »
I see what you mean now.
As far as I am concerned all export packages of lazreport shouls work the same, maybe it is a bug in this specific export component?
Hopefully the maintainer of lazreport can shed some light on this problem.
It seems that TlrSpreadSheetExport can not be placed on more that one (loaded) form in the project, since attempt to create a second instance of it results in that error.

When I'm inheriting a form I'm actually replicating  the component in each successor, trying to load the second inherited form tries to create another instance of the TlrSpreadSheetExport. This happens also in the IDE.

And that means TlrSpreadSheetExport works differently than other export components.
"I'm sorry Dave, I'm afraid I can't do that."
—HAL 9000

 

TinyPortal © 2005-2018