SAP Knowledge Base Article - Public

2438479 - Crystal for Visual Studio web preview does not show the Parameter Name in the Prompt Text in a WEB app


We have switched from crystal 12 to crystal 13 (SAP Crystal Reports for Visual Studio 2010 (13.x)) in our custom web site.

There is a small issue with report created with older version of crystal.

Note: Older versions of Crystal Reprot designer would write nothing in the prompt text parameter value.

When Crystal Reprot for VS previews with Parameters it only writes the prompt text which is blank.


Crystal Reports for Visual Studio


This issue has been escalated to R&D to look into.

Work karound:

This needs to be done on every postback. If it's not done clicking on the refresh button inside the crystal top panel will show empty prompt text.

  • foreach (ParameterFieldDefinition param in reportDocument1.DataDefinition.ParameterFields)
  • {
  • //reportDocument1.DataDefinition.ParameterFields instead of reportDocument1.ParameterFields because the first one
  • //allow me to get the parameter name and the second don't.
  • //If the parameter is a from the main document - is not from a subreport
  • //Changing the PromptText of a subreport parameter will return an error "Illegal handle"
  • //Note that this code still work with main document parameter linked to a subreport parameter.
  • //In this case the main document parameter will be IsLinked=False, and there will be a second parameter in the subreport with IsLinked=true.
  •    if (param.IsLinked() == false)
  •    { if (String.IsNullOrEmpty(param.PromptText))
  •       {
  •          param.PromptText = param.Name;
  •       }
  •    }
  • }

If there is no prompt text on the report, crystal 13 show nothing, as shown in picture.

If there is no prompt text on the report, crystal should show the parameter name as the prompt like the 12.x version did.


cr for vs, parameter prompt text, web, web viewer , KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , Problem


SAP Crystal Reports, developer version for Microsoft Visual Studio