Report.Modified is not working.
Hi,
However much I tried, I was unable to force save dialog popup. The property
that you said I should set to true for that purpose Report.Modified is not
working. I tried to put it in the Template.OnLoadEnd and Template.OnNew
events, but it still didn't work.
Setting it to either true or false doesn't affect report behaviour at all.
What should I do?
Thanks,
MB.
However much I tried, I was unable to force save dialog popup. The property
that you said I should set to true for that purpose Report.Modified is not
working. I tried to put it in the Template.OnLoadEnd and Template.OnNew
events, but it still didn't work.
Setting it to either true or false doesn't affect report behaviour at all.
What should I do?
Thanks,
MB.
This discussion has been closed.
Comments
to see if the report is modified when shutting down the form. I load a
report template using the designer component at runtime with this code.
procedure TForm1.ppDesigner1CloseQuery(Sender: TObject; var CanClose:
Boolean);
begin
if (ppReport1.Modified) and (Application.MessageBox('Save this report',
'', MB_YESNO) = IDYES) then
ppReport1.Template.SaveToFile;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ppDesigner1.ShowModal;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
ppReport1.Template.OnLoadEnd := LoadendEvent;
end;
procedure TForm1.LoadEndEvent(Sender: TObject);
begin
ppReport1.Modified := {Pick True or False to test};
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
my case.
But, thanks to the example, I can see a workaround now. It is to use
OnCloseQuery event and global variables.
Thanks for the help.