Setting the Sql-Where and Sql-OrderBy in a Template
Hi Cracks,
we've got prepared Reports, wich are saved in a Database as a template. Now
we want to open them and setting a individual Where and OrderBy Command.
How???
The actual commands are:
ppReportExplore.LoadReport(sReport, nIdFolder);
ppReport.print;
Thanks in advance for all help provided here.
Regards,
Helmut Auffinger
we've got prepared Reports, wich are saved in a Database as a template. Now
we want to open them and setting a individual Where and OrderBy Command.
How???
The actual commands are:
ppReportExplore.LoadReport(sReport, nIdFolder);
ppReport.print;
Thanks in advance for all help provided here.
Regards,
Helmut Auffinger
This discussion has been closed.
Comments
dataviews in each report, using the Query Designer. This is available in
the Professional and Enterprise editions of ReportBuilder. Use the Report
Explorer as shown in the End User Databases demos in the RBuilder
installation to open and save the templates on the database.
If you want to edit the templates in code, rather than in the runtime
designer, then there is a way. Here is an example which shows how to change
the templates data access definitions at runtime:
http://www.digital-metaphors.com/tips/ExtractSQLObject.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
I used your Function "GetSQLObject(aReport: TppCustomReport; var aSQL:
TdaSQL): Boolean;"
and with aSQL I continued
aSQL.EditSQLAsText := true;
aSQL.MagicSQLText.add(sWhere);
aSQL.MagicSQLText.add(sOrderBy);
// sWhere, sOrderBy are Strings and comes from outside.
Thanks a lot for the rapid help,
Helmut Auffinger.