Skip to Content

C# - Crystal Reports - Get FieldObject database type

Mar 12 at 12:12 PM


avatar image

So after I load a report doc. I would like to loop through all of the reportobjects or use the method of GetReportObjectsByType to get all the fieldobjects. Then I would like to loop through all these field objects and see what DATATYPE they are that corresponds with the database (table and field they are mapped to would be great too). Essentially trying to get all of the DATE field types from a report dynamically. So I can provide the end user filters to be able to use.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Don Williams
Mar 13 at 02:41 PM

Hi Mike,

Go here to get the SDK:

Read all of the info for SP 21, must do...

Half way down is a link for setting parameters, it has a drop down box to get all field info.

Should help you get started.


Show 2 Share
10 |10000 characters needed characters left characters exceeded

I don't think you're understanding my question properly.

It's not a PARAMETER. I am wanting to get all available DATE or DATETIME - Database fields that are available in each of the tables that are being used in the report file.


Load Report File.

Run through all tables that are being used for the report.

Capture the database field name and table of any field that is typed as a DATE or DATETIME.

I will then use these fields in my FILTERS OPTIONS so I Can then pass a record selection to the report.


I don't think you download the project and had a look at it, it's more than just a parameter test app...