SAP Knowledge Base Article - Public

2262775 - Crystal Reports database error when hierarchy node is set as prompt value

Symptom

  • Hierarchy node is added manually as prompt value like: [Dimension             HierarchyName].[NodeName           0HIER_NODE]
  • Report shows "Failed to retrieve data from the database." or "BAPI Error #:0 0HIER_NODE is not a valid characteristic for InfoProvider <InfoProviderName>" error when refreshed.
  • With another node the report might work properly

Environment

  • SAP Crystal Reports 2008
  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016

Reproducing the Issue

  1. Create a BEX query with a hierarchy in BW
  2. Create a Crystal report against the query
  3. Create a prompt for the hierarchy
  4. Put a hierarchy node MDX statement into the prompt
  5. Run the report and observe the error

Cause

  • You've used wrong number of placeholder characters (spaces) in the MDX statement

Resolution

  • Using MDX syntax in prompt value is not recommended since it can cause other errors as well.
  • If you still want to use it, the hierarchy name has to start precisely on the 31st position, like:
    Syntax.jpg
  • You can copy and rewrite the below sample. (use "insert" in your keyboard to maintain correct positions)
    [Dim                           HierarchyName].[NodeName                        0HIER_NODE]

See Also

Keywords

mdx, prompt, hierarchy, node, value, dimension, length, position, CR, sap, BW, menu, integration, kit , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016