cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatic Changes

Former Member
0 Kudos

How do I programaticlly remove a report field from the .rpt before viewing or even add something to it?

http://www.pastebin.com/tb4FTJ3U

Accepted Solutions (1)

Accepted Solutions (1)

ido_millet
Active Contributor
0 Kudos

Simplest approach is to use a parameter to control whether or not that field (or section) is suppressed.

Former Member
0 Kudos

How do you mean?

former_member292966
Active Contributor
0 Kudos

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

Answers (0)