- First parameter prompt you to type a letter, and the second prompt shows a dynamic list of values that starts with that letter.
- How can you create a dynamic cascading parameter which will let you first choose the first letter, and then choose from the shorter list of only those values beginning with that letter?
- When creating a parameter to choose a value from a list of values, it is often helpful to break up the list; for example, using the first letter of the value. How can we create this type of parameter in Crystal Reports?
SAP Crystal Reports 2008
SAP Crystal Reports 2011
SAP Crystal Reports 2013
SAP Crystal Reports 2016
- There is no option in Crystal Reports to directly create this type of dynamic cascading prompt, but it is possible to create it using the Business View Manager.
- In the Business View Manager, create the following objects, based on the data source and tables you need for the parameter, if you do not already have it created.
- Data Connection
- Data Foundation
- Business Element
- Business View
- Edit the Data Foundation.
- Create a new SQL Expression Field by right-clicking on SQL Expressions under the Object Explorer, and choosing Insert SQL Expression.
- In the function creation window, expand Functions, and then String. Double-click on the function you want to use; to use the first letter, double-click on LEFT( , ).
- With the cursor to the left of the comma, expand Data Foundation, then expand the table with the field you want to use, then double-click the field.
- Move the cursor to the right of the comma, and enter 1 (to use the first letter of the field).
- Click the X+2 button to check for errors, then click Apply.
- In the Property Browser, click on the ... beside Rights and ensure that you grant rights to the appropriate users and groups.
- Save the Data Foundation.
- Edit the Business Element.
- In the Object Explorer, right-click on Fields, then click on Insert Business Fields.
- Choose the SQL Expression you just created, click Add, then click Close.
- Then save the Business Element.
- Create a new List of Values
- Choose the appropriate Business View. Name the List of Values.
- Under Available Fields, select first the SQL Expression field you created (e.g. "Customer First Letter") and move it over to List of Value Fields.
- Then select and move the data field (e.g. "Customer Name").
- Click OK to create and save the List of Values.
- In Crystal Reports, open the report in which you want to create the parameter.
- In the Field Explorer, right-click on Parameter Fields and click New....
- Choose Dynamic list of values. Under Choose a Data Source, choose Existing, then choose the List of Values you just created. Where necessary, click under Parameters where it says "Click to create parameter".
- Click OK to save the new parameter.
- Edit your record selection formula in Crystal Reports to ensure the data is filtered by the field or the SQL Expression you created.
- Now, when you run the report, you should have a prompt in which you first choose from the SQL Expression field (e.g. the first letter of the customer name from A to Z), and then choose from a reduced list of values showing only the data fields (e.g. customer names) that begin with that first letter.
dynamic cascading parameter dcp first letter break down breakdown subdivide sub divide choose field , 5914533 , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , How To
Crystal Reports 2008 V0 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016