Load a report from database.
what is the best way to load a template from a report stored in the rbitems table of the database ?. I am using the following lines of code, but it shows me a controlled message that informs me that the report does not exist.
ppReport.Template.DatabaseSettings.Name := pReportName;
ppReport.Template.DatabaseSettings.FolderId := pFolder;
ppReporteBase.Template.DatabaseSettings.DataPipeline := ppDBPipelineBase;
ppReporteBase.Template.LoadFromDatabase;
ppReport.Template.DatabaseSettings.Name := pReportName;
ppReport.Template.DatabaseSettings.FolderId := pFolder;
ppReporteBase.Template.DatabaseSettings.DataPipeline := ppDBPipelineBase;
ppReporteBase.Template.LoadFromDatabase;
Comments
If you are attempting to manually load a report previously saved with the Report Explorer, you will need to use the following method described in the article below. You can either use the ReportExplorer.LoadReport routine, or implement the Template.OnLocateRecord event if you would like to use the Template.LoadFromDatabase routine.
http://rbwiki.digital-metaphors.com/design/templates/how-to-programmatically-load-reports-saved-using-the-report-explorer/
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com