how to change report name for Exit save
For TppDesigner, I load the template from database and I don't allow user to
simply save and load any report they want. This is because the reports are
shared in a client/server database and only users with enough priority can
access them. For report, I use an ID field for unique key, as in the report
code is not unique. According to the sample, you would need a unique name to
load a template from database (LoadfromDatabase). So, because of this, the
ID is used.
My problem is when I exit, it prompt the message. "Save changes to ##?'
where ## is the ID. How do I show the Report Code instead of the Report ID??
TIA
simply save and load any report they want. This is because the reports are
shared in a client/server database and only users with enough priority can
access them. For report, I use an ID field for unique key, as in the report
code is not unique. According to the sample, you would need a unique name to
load a template from database (LoadfromDatabase). So, because of this, the
ID is used.
My problem is when I exit, it prompt the message. "Save changes to ##?'
where ## is the ID. How do I show the Report Code instead of the Report ID??
TIA
This discussion has been closed.
Comments
the reports for you users.
You can change the Report.Name by reading from a query on the templates
table to get at the name field and set the Report.Name property. Use the
Report.Template.OnLoadEnd event to set this, so that it will be already set
on the report before the report is saved.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
more and at least we could customize however we wants to. I'll try on your
suggestion and see if it can work.
FormCreate
begin
ppReport.Template.OnLoadEnd := TemplateOnLoadEnd;
end;
procedure TForm1.TemplateOnLoadEnd(Sender: TObject);
begin
ppReport.Template.Report.Name := 'hello';
end;
visual interface to your bosses liking. There is an example of registering a
replacement in the installed tutorials in:
C:\Program Files\Borland\Delphi6\RBuilder\Tutorials\Complete\II.
Applications\04. End-User with Custom Explorer
I was mistaken. The property used in the confirmation dialog is
Report.Template.Description, which gets its value from the
Report.Template.DatabaseSettings.Name. You could try setting that property
after loading the report template.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
call to replace it anyway.
back to the confirmation dialog, the code that you gave me did do the job
but it introduced a bug. When I save, it show:
"EIBClientError: Cannot insert into dataset. (No insert query)."
I guess it is quite clear what happened. It couldn't locate the record. RB
uses the Description to locate the record. Is there any workaround. It is
kinda important..