views:

16

answers:

1

I'd like to iterate through a certain set of fields in a report (rpt) file and, for the sake of argument, make them have a blue background. I'd like to do this for many files and on a conditional basis. The ReportDocument class seems like the way to go, but I don't see any Fields or anything like that in the API.

Is there a way to do this via C#?

Update: I'd like to do this without editing the .rpt file, since this behavior is only needed for development.

CR 9.2

+2  A: 

You can do this by a workaround. Create a parameter on your report and use that on setting the field's background (on the Formula Editor). and on your code change the value of the parameter during runtime to change the field's background (based on the color set for a particular value of the parameter on the field's properties).

Jojo Sardez
Thanks for the answer. Unfortunately this would mean modifying the report document. Very time consuming, I'd like to do this for about 50 reports. And I'd only like to do it during development, not with code that will be deployed to the production server. I'll update the question.
jcollum