Configuring template for end-user report
Hi.
For my end-user report, I would like to configure it so when someone creates
a new report, the header is already configured with an icon and some text.
This material should be the same for every report.
Questions are:
1. What is the best way to configure it so when someone starts a new report,
it loads with this template (but will not change the template if the user
changes something)
2. How can I stop the user changing the template part of the report (image,
text) while allowing them to change the rest of the report
3. Can I allow an administrator (in my security schema) to edit the template
analogously to editing a report so all new reports created with the report
explorer will see this modified template as the starting point for designing
a report?
Thanks,
Lauchlan M.
For my end-user report, I would like to configure it so when someone creates
a new report, the header is already configured with an icon and some text.
This material should be the same for every report.
Questions are:
1. What is the best way to configure it so when someone starts a new report,
it loads with this template (but will not change the template if the user
changes something)
2. How can I stop the user changing the template part of the report (image,
text) while allowing them to change the rest of the report
3. Can I allow an administrator (in my security schema) to edit the template
analogously to editing a report so all new reports created with the report
explorer will see this modified template as the starting point for designing
a report?
Thanks,
Lauchlan M.
This discussion has been closed.
Comments
See RBuilder\Demos\End User\Dynamic Subreport Loading demo.
2. Since the design of the header is in a whole separate template, simply
restricting access to the template (whether in a separate file or in a
database) should do the trick. For example, make the file read only. You
still can't prevent the user from placing additional content into the header
but at least they can't change the standart template. Of course you can
always delete any of additional content from the report during the process
of loading the header template.
3. Same idea as 2, allow the admin to edit this file.
--
Cheers,
Alexander Kramnik
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
OK, I've seen that. But assuming I want one standard report template to load
on each new report (as the whole report, not just as a subreport band), how
do I do it?
I figure I set up the filename for the template proerty of the report, then
have in the ReportDesigner CreateReport handler
procedure TDataModuleReportExplorer.ReportDesignerCreateReport(
Sender: TObject; const aDataName: String; var aReport: TObject);
begin
Report.Template.LoadFromFile;
end;
{all the report components and pipes are in a datamodule)
This doesn't however seem to load the file into the report.
I also have in the DataModule Create Handler:
begin
Report.Template.OnLoadEnd := LoadEndEvent;
end;
procedure TDataModuleReportExplorer.LoadEndEvent(Sender: TObject);
begin
Report.OnPreviewFormCreate := PreviewFormCreateEvent;
end;
procedure TDataModuleReportExplorer.PreviewFormCreateEvent(Sender: TObject);
begin
ppReport1.PreviewForm.WindowState := wsMaximized;
TppViewer(Report.PreviewForm.Viewer).ZoomSetting := zsPageWidth;
end;
Thanks,
Lauchlan Mackinnon.
Report.Template.FileName := 'mytemplate.rtm';
Report.Template.LoadFromFile;
--
Cheers,
Alexander Kramnik
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
I have a filename set up in the design time properties . . . do I need to do
it in runtime as well?
Thanks,
Lauchlan M.
"Alexander Kramnik (Digital Metaphors)" wrote