Re: RTM's and DLL's
Hello.
What I would like to do is create a dll with .rtm files in it. Then call the
dll and load the reports into the database using the method below:
ppreport1.Template.FileName := FileListFileName.Strings[i];
ppreport1.Template.LoadFromFile(ReportDLL, Report.rtm);
ppreport1.Template.DatabaseSettings.Name := FileListDBName.Strings[i];
ppReport1.Template.SaveToDatabase;
Could someone give me a hint as to how this would work?
Many thanks in advance!
Tim Armstrong
What I would like to do is create a dll with .rtm files in it. Then call the
dll and load the reports into the database using the method below:
ppreport1.Template.FileName := FileListFileName.Strings[i];
ppreport1.Template.LoadFromFile(ReportDLL, Report.rtm);
ppreport1.Template.DatabaseSettings.Name := FileListDBName.Strings[i];
ppReport1.Template.SaveToDatabase;
Could someone give me a hint as to how this would work?
Many thanks in advance!
Tim Armstrong
This discussion has been closed.
Comments
There is no built in way to add and extract report template files to a .dll
file. One approach would be to save your template filest in ASCII format
and then save them as a string in a resourse file (.res). Then you can
compile these resource files in with your .dll project, later extracting
them and saving the strings as Blob fields in your database.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
that are attached to the report are not present.
ppreport2.Template.DatabaseSettings.Name := FileListDBName.Strings[i];
ppreport2.Template.LoadFromDatabase;
ppreport1 := ppreport2;
ppreport1.Template.DatabaseSettings.Name := FileListDBName.Strings[i];
ppreport1.Template.SaveToDatabase;
If a report template has event handlers connected to it and you load it to a
report object without these event handlers defined, you will run into some
issues. You then have two choices.
1. Be sure all event handlers present when the report template was created
are present in the current application you load the report to. (They must
be named the same as well).
2..Use RAP to store all your event handler code locally inside each report
template. RAP (Report Application Pascal) is available with ReportBuilder
Enterprise Edition and allows you to keep all event handler code, as well as
other report code inside the report template so each report can execute
independently of a specific applicaiton. For more information on RAP, check
out our web site and/or try downloading a trial version of ReportBuilder
Enterprise.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com