RestoreReportFromStream not always executed
Hi,
After upgrading to RB 10 I've had some problems with some reports which
change RichText fields in RAP code. After previewing in the editor, the
RichText contained the report-text and not the design-text. After
debugging I found the problem. If the main report page doesn't have any
code, the report is not restored after previewing:
In TppDesignPreviewManager.RestoreReportFromStream;
if (lModuleClass = nil) or (FReport.GetModuleForClass(lModuleClass) =
nil) then Exit;
The GetModuleForClass returns nil.
However, one or more subreports do have code modules.
I solved this by adding an empty method in the code of the main report,
but a permanent solution in the RB code would be nice.
Regards,
Marco.
After upgrading to RB 10 I've had some problems with some reports which
change RichText fields in RAP code. After previewing in the editor, the
RichText contained the report-text and not the design-text. After
debugging I found the problem. If the main report page doesn't have any
code, the report is not restored after previewing:
In TppDesignPreviewManager.RestoreReportFromStream;
if (lModuleClass = nil) or (FReport.GetModuleForClass(lModuleClass) =
nil) then Exit;
The GetModuleForClass returns nil.
However, one or more subreports do have code modules.
I solved this by adding an empty method in the code of the main report,
but a permanent solution in the RB code would be nice.
Regards,
Marco.
This discussion has been closed.
Comments
After looking at the RB 10.07 code and running it, we found that the main
report's code module is created even if there is only RAP code in a
subreport. Try upgrading to the latest version of ReportBuilder (10.07) and
see if that solves the problem.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thank you for your reply. Strange, have version 10.07. The rbent11.exe I
downloaded 5 days ago from the link in the registration mail says 10.07,
the release notes say version 10.07, but my bpl's are named
rbRCL10105.bpl etc. I this correct?
Marco.
Yes, rbRCL10105.bpl is the correct package. Are you able to recreate this
behavior with a simple example? If so, please send it in .zip format to
support@digital-metaphors.com and we'll take a look at it for you.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I've created a simple example and will send it to you.
Marco.