Skip to Content
avatar image
Former Member

Access group name using Crystal .NET SDK

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Feb 01 at 06:45 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 18, 2017 at 05:31 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 19, 2017 at 02:31 PM

    Hi Brian,

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 19, 2017 at 08:56 PM

    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?

    Add comment
    10|10000 characters needed characters exceeded