Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8857291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:33:16+00:00 2026-06-14T14:33:16+00:00

I am trying to get the default value description from a Crystal Reports parameter.

  • 0

I am trying to get the default value description from a Crystal Reports parameter. This is the code that I am using. To test the value I am using a message box. Here is my code. The message box shows up empty.

foreach (ParameterField param in clsCrystal.cryRtp.ParameterFields)
{
    if (param.Name.Equals("ShowUp"))
    {
        MessageBox.Show( param.DefaultValues[0].Description.ToString());
    }
}

Edit:
I figured out how to get the values of the default values for a parameter field but the description is still evading me. Here is the working code to get the value of the default values.

foreach (ParameterField param in clsCrystal.cryRtp.ParameterFields)
{
    if (param.Name.Equals("ShowUp"))
    {
        foreach (ParameterDiscreteValue Dvalue in param.DefaultValues)
        {
            MessageBox.Show("the value is " + Dvalue.Value.ToString() + " and the description... " + Dvalue.Description);
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:33:17+00:00Added an answer on June 14, 2026 at 2:33 pm

    Apparently the ParameterFields is not as robust as DataDefinition.ParameterFields I found the answer at this link. http://scn.sap.com/thread/889809 Seems like ParameterFields is designed to make it easier to add values to parameters, while DataDefinition.ParameterFields are the real objects to play with if you actually want to look around at stuff.

    foreach (ParameterFieldDefinition param in clsCrystal.cryRtp.DataDefinition.ParameterFields)
    {
        if (param.Name.Equals("ShowUp"))
        {
            foreach (ParameterValue parameterValue in param.DefaultValues)
            {
                if (!parameterValue.IsRange)
                {
                    ParameterDiscreteValue parameterDiscreteValue = (ParameterDiscreteValue)parameterValue;
                    MessageBox.Show(parameterDiscreteValue.Description);
                }
            }
        }
    }
    

    The incredibly confusing thing about the code and the documentation was that I could actually set and read the Default Descriptions in my code. I just couldn’t read them when they were set from the Crystal Reports Designer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to set a default value for attribute threshold in this code,
I'm trying to get the selected value from a drop down list via jQuery.
rails 3.2.8 simpleform Im trying to get a default value for each of the
I'm trying to get the parameter of user name and replace its value with
Trying to get the findcontrol to work so I can set the default value
I was trying to get a symbol like ® to be a default value
I am trying to get a default query to implement upon page load but
I am trying to get the node ref of file uploaded to default root
I'm trying to get the new ASP.NET Web API beta (VS 2010 default Web
I'm trying get the visible portion of UIImage from an UIImageView . UIImageView takes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.