10.08 Report Preview
We're using Reportbuilder Enterprise Edition, 10.07, with Delphi 2007.
I'm just testing 10.08 and it appears that OnSaveStart is triggered when a
new report is previewed. I am certain that this never happened in 10.07.
We are storing our reports in a DB.
I'm still trying to sort out the exact timing of this problem. Has anyone
experienced this problem?
Leah
I'm just testing 10.08 and it appears that OnSaveStart is triggered when a
new report is previewed. I am certain that this never happened in 10.07.
We are storing our reports in a DB.
I'm still trying to sort out the exact timing of this problem. Has anyone
experienced this problem?
Leah
This discussion has been closed.
Comments
Are you able to see this with a simple example? In my quick testing
(report, designer, button on a form) I was unable to get the
Template.OnSaveStart event to fire unless I saved the template to file/DB.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Okay, I've figured out the problem -- it's in SaveReportToStream in
ppDesignPreview.pas (called during Preview):
10.08:
------------
// if RAP not being used, exit
if (lModuleClass = nil) then Exit;
// if Delphi design-time and report does not contain RAP code, exit
if gbDesignTime and (FReport.GetModuleForClass(lModuleClass) = nil) then
Exit;
------------
10.07:
------------
if (lModuleClass = nil) or (FReport.GetModuleForClass(lModuleClass) = nil)
then Exit;
------------
So in 10.07, this is true "FReport.GetModuleForClass(lModuleClass) = nil" so
I'm not prompted to Save.
In 10.08, it's not gbDesignTime, so I AM prompted to Save.
I'm not sure why this change was made? Am I correct here? Maybe it should
be Design Time "OR" the report has no RAP?
Leah
consistent. When using the end-user designer, some reports were
save/restored when selecting/deselecting Preview while other reports were
not. When a report is previewed, event-handler code may fire that modifies
the report, therefore a save/restore to an internal stream is performed.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Leah
It is saved to an internal memory stream.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
triggered on the preview. I guess I'll have to change this.
Tryy adding a check to your OnSaveStart event-handler code.
uses
ppTypes, ppComm;
if (pppcDesignPreviewing in Report.DesignState) then
// report is previewing
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Leah