- Crystal Reports Tutorial
- Crystal Reports - Home
- Crystal Reports - Overview
- Crystal Reports - GUI Navigation
- Crystal Reports - Options
- Crystal Reports - Page Layout
- Crystal Reports - Getting Help
- Crystal Reports - Design Environment
- Crystal Reports - Data Sources
- Crystal Reports - Queries
- Query Filters & Filter Conditions
- Crystal Reports - Time Based Filters
- Field Objects Controls & Modifications
- Crystal Reports - Sections
- Crystal Reports - Delete Sections
- Crystal Reports - Groups
- Crystal Reports - Group Options
- Crystal Reports - Templates
- Crystal Reports - Inserting Objects
- Crystal Reports - Charts
- Crystal Reports - Cross Tab Layout
- Crystal Reports - Defining Formulas
- Crystal Reports - Formula Workshop
- Creating & Modifying Formulas
- Crystal Reports - Apply Boolean Formulas
- Crystal Reports - If-Then-Else
- Crystal Reports - Applying Calculations
- Crystal Reports - Conditional Formatting
- Crystal Reports - Creating Variables
- Crystal Reports - Creating Arrays
- Crystal Reports - Parameters
- Crystal Reports - Filters
- Crystal Reports - Prompt Panels
- Crystal Reports - Cascading Prompts
- Crystal Reports - Create Parameter Field
- Crystal Reports - Edit Parameter Field
- Crystal Subreports - Overview
- Crystal Reports - Data Export Overview
- Crystal Reports - Data Export to Excel
- Crystal Reports - Data Export to XML
- Crystal Reports - Data Export to HTML
- Crystal Reports - Data Export to CSV
- Crystal Reports Useful Resources
- Crystal Reports - Quick Guide
- Crystal Reports - Useful Resources
- Crystal Reports - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Crystal Reports - Parameters
Parameters are used to take user inputs before the report is generated. User has to answer the prompt before the report is generated and the report output depends on the response of the user for the parameter value.
By using parameters with formulas and in the report, you can create a single report that changes according to the requirement of different users.
LOVs can be used to enter prompt values in parameters. LOVs can be either static or dynamic. They can also be used as single level dynamic prompts or multilevel prompts.
Note − Parameters in Crystal Reports can be used in filters after it is retrieved from the database.
Parameters with dependency are grouped together and are known as cascading parameters. Cascading parameters allow you to group two or more parameters in a single group.
Parameters can also be created at universe level or in query panel and they can be later inherited into Crystal Reports. They are called inherited parameters. These parameters can be dropped at the report level but they can’t be edited in a report. These parameters can only be edited where they are created.
Parameter Data Types
Parameters in Crystal Report support below data types −
Important points to remember while using Parameters −
To use parameter in a formula, it is not necessary to be placed in the report. Parameters can be used in a formula like other objects and can be created in the Formula workshop.
Parameters can be used with static or dynamic LOVs.
You can also create a list of values from which the user can choose the parameter value instead of entering it manually.
List of Values Types
|Type||Description||When to Use|
|Static LOVs||Provides a simple list based on the values you add or import in the report||
|Dynamic LOVs based on report data||Provides a dynamic list from the data Source||
|Universe LOVs||Provides a list created and Maintained in the Universe.||
How to create a Parameter?
In Data Explorer view, right-click within the Parameters area → select New → New Parameter
The Create Parameter dialog box appears → Enter a name for the parameter (up to 255 alphanumeric characters). In the dialog box, you can change the name and type of the parameter along with other properties.
Select the appropriate Data Type from the list → such as String, Number, or Date, among others.
In the Prompt Text box, enter the desired prompting text (up to 255 alphanumeric characters).
For example − "Select a Name"
This text will appear in the prompting dialog box when you preview the report, or when you refresh the data on the Page area.
To create a list of values, click the ellipsis button → The Edit List of Values dialog box appears → Enter the values that you want to see when you are prompted → you might add a list of countries for a String type, or a list of values for a Number type → click OK → You return to the Create Parameter dialog → click OK and drag the parameter to your Report.
Once the parameter is dragged to the structure of report, you can go to page tab to see LOVs selected while refreshing the report data.