Prompt is used in Crystal report, because it is used in the parameter field, which helps to arrange the value of the report. When we will work on the prompt, we also find Optional prompt in the value option. This is an optional tab and it means it is not compulsory to choose this tab. Prompt supports the user interface, which helps you to determine the presence of the promoting dialog box.
First, go to Field Explorer -> Right click Parameter -> New.
When we will click New, we see “Edit Parameter” box in our Window.
Now, fill this box step by step,
- Enter the name of the parameter.
- Value Field -> Select our database field.
- Action -> Append all the database value.
- Value Options -> Allow Custom value -> True.
- Value Options -> Allow Multiple value -> True.
Here, we used Action, because action selects all the data, which is existing in our database and show this data at the run time in the prompt, where we can select the limited data, according to the condition.Custom Value provides the custom value and Multiple value gives an opportunity to select the multiple data at single point of time.
After completing all the process, click OK. Go to “Design” part of the report and drag the parameter name from Field Explorer.
Now, go to Filter Tab -> select database -> click OK and then we will see Select Expert box in our Window. Here, choose the condition for the data, select our parameter name, click OK.
To show the output, go to View -> Click Print Preview tab.
Now, we can see our Prompt Window in the screen. Here, we will find all the data, which we insert in the database, select the record, click the next button. Repeat this process again and again. Cover all the data, which we want to show in the report. At the end, click OK.
Now, we can easily see the output on our screen.
Summary
Thus, we learnt that prompt is used to arrange the values with the help of the parameter in Crystal Report and also learnt its work.