on 03-15-2011 1:43 PM
How do I programaticlly remove a report field from the .rpt before viewing or even add something to it?
Simplest approach is to use a parameter to control whether or not that field (or section) is suppressed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dan,
There are a couple of ways to add/remove fields from a report. It depends on the complexity of the report and whether or not this dynamic field is being used in other parts of the report like grouping, formulas, etc.
One way is to create a formula on the report. From your application, you can pass the field name to the formula. In the report, the formula can be used in formulas or grouped so you only need to tell it what field to use now.
If all you wanted to do was to show/hide a field, you could have a parameter on the report that returns a boolean. In the fields you want to show/hide set the Suppress formula to the value of the parameter. Now you can set the parameter from your application.
If the report is more ad-hoc then you can create a report using ADO instead of connecting to the database. This will allow you to create a recordset in your application and pass the recordset to the report.
Hope this helps,
Brian
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.