Skip to Content
0

Access group name using Crystal .NET SDK

Dec 15, 2017 at 06:43 PM

105

avatar image
Former Member

We are using the CR runtime for Visual Studio v13.0.19 and the ReportDocument object model.

We are trying to access the group by name contained in a Crystal Report through the API, but have not been successful in finding the appropriate property or methods.

Is this feasible using the ReportDocument class?

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

4 Answers

Best Answer
Don Williams
Feb 01 at 06:45 PM
0

Hi Dave,

I have a test app link on the download WIKI:

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

https://blogs.sap.com/2016/02/17/how-to-parameters-in-crystal-reports-for-visual-studio-net/

In that app I get the Group info in the drop down list.

See if that works for you.

Don

Share
10 |10000 characters needed characters left characters exceeded
Brian Dong Dec 18, 2017 at 05:31 PM
0

Hi Dave,

The Group Field classes are in the Engine Object.

From there you can call GroupNameFieldDefinitions Class to get all the GroupNames in the report. Then you can call GroupNameFieldDefinition to get the individual GroupNames.

Hope this helps,

Brian

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Dec 19, 2017 at 02:31 PM
0

Hi Brian,

Thanks for the response. We will try this out and let you know of the result.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Dec 19, 2017 at 08:56 PM
0

Hi Brian,

When inspecting the values for the above properties, we received errors:

GroupNameFields {System.NullReferenceException: Object reference not set to an instance of an object.

Groups {System.NullReferenceException: Object reference not set to an instance of an object.

Inspecting the above properties as a collection (i.e. GroupNameFields(0)) still does not yield any useful information.

We are accessing the following object CrystalDecisions.CrystalReports.Engine.ReportDocument. Is is possible that the ReportDocument object model does not allow access to these properties?

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

Are you trying to access this info before or after you've refreshed the report? You would have to refresh the report first to get the info.

-Dell

0
Former Member

After.

Is there any documentation on the ReportDocument class to determine whether we are using the correct methods?

0
0