It seems that Report.Modified is always true in the DesignerClose event - even if the user did not change anything. I even tried to set Report.Modified := false before launching the Designer, and to save the report directly before launching the Designer....to no avail.
Unfortunately, it seems that you are right. I think the reason is that the report doesn't use the default 'Units' setting 'utInches'. Looks like a bug in TppDesignerWindow.SyncUnits, not respecting the loading state of the template. I am sure, you will see here a comment from DM in short.
Comments
check the property 'Report.Modified' in the designer's 'OnClose' event.
procedure TStandardMethodObject.DesignerClose(Sender: TObject;
var Action: TCloseAction);
begin
Action := caFree;
if Sender = nil then begin
Exit;
end;
if not (Sender is TppDesignerWindow) then begin
Exit;
end;
if TppDesignerWindow(Sender).CurrentReport = nil then begin
Exit;
end;
with (TppDesignerWindow(Sender).CurrentReport) do begin
if Modified then begin
Template.SaveToFile;
end;
end;
end;
regards,
Chris Ueberall;
even if the user did not change anything.
I even tried to set Report.Modified := false before launching the Designer,
and to save the report directly before launching the Designer....to no
avail.
Unfortunately, it seems that you are right.
I think the reason is that the report doesn't use the default 'Units'
setting 'utInches'.
Looks like a bug in TppDesignerWindow.SyncUnits, not respecting the loading
state of the template.
I am sure, you will see here a comment from DM in short.
regards,
Chris Ueberall;
Svein, please send a request which includes your correct email address to
support@digital-metaphors.com and we'll send you a patched unit.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com