How are the Load and Save functions insufficient for your needs? The TppReportTemplate class in embedded and cannot be replaced. Please let me know what your ultimate goal is and I'll try to find a work-around for you as quickly as possible.
I would like to load and save the report template to and from a MemoryStream. For the main report it works fine with the OnCustomOpenDoc, But i use a subreport in my main form which i load dynamically an the ReportBeforePrint event
How can i do this to load from a MemoryStream ? (Without replaceing the template ?)
The next point, how can i enable the "Save" and "Open" and "Save To" menuitems in the Report Designer when i don't use a DataPipelin in the Template.Databasesettings ? (When i remove the DataPipeline, the menu items allways gets disabled .... )
It is possible to load and save a template from a MemoryStream using the TppTemplate.LoadFromStream routine. I am not fully clear about what is happening to prevent you from loading a template from stream and then dynamically adding a template from database to a subreport in your main report. You could possibly load the template from database and save it to stream first, then load it as you need it throughout the process of your application.
Be sure you have the TppDesigner.AllowSaveToFile property set to True to enable all the file menu items. Also be sure that your Report.Template.SaveTo property is set to stFile rather than stDatabase.
Comments
How are the Load and Save functions insufficient for your needs? The
TppReportTemplate class in embedded and cannot be replaced. Please let me
know what your ultimate goal is and I'll try to find a work-around for you
as quickly as possible.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
MemoryStream.
For the main report it works fine with the OnCustomOpenDoc,
But i use a subreport in my main form which i load dynamically an the
ReportBeforePrint event
SubReport1.Report.Template.DataBaseSettings.Name := 'SchriftKopf';
SubReport1.Report.Template.LoadFromDataBase;
How can i do this to load from a MemoryStream ? (Without replaceing the
template ?)
The next point, how can i enable the "Save" and "Open" and "Save To"
menuitems in the Report Designer when i don't use a DataPipelin in the
Template.Databasesettings ? (When i remove the DataPipeline, the menu items
allways gets disabled .... )
thanxs in advance
Andreas
It is possible to load and save a template from a MemoryStream using the
TppTemplate.LoadFromStream routine. I am not fully clear about what is
happening to prevent you from loading a template from stream and then
dynamically adding a template from database to a subreport in your main
report. You could possibly load the template from database and save it to
stream first, then load it as you need it throughout the process of your
application.
Be sure you have the TppDesigner.AllowSaveToFile property set to True to
enable all the file menu items. Also be sure that your
Report.Template.SaveTo property is set to stFile rather than stDatabase.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com