0% found this document useful (0 votes)
30 views

Crystal Reports Data Selection Adding Prompting Query Fields

Uploaded by

Ahmed abdallah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Crystal Reports Data Selection Adding Prompting Query Fields

Uploaded by

Ahmed abdallah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

CRYSTAL REPORTS

Data Selection: Adding prompting query fields and related record


selection criteria to a report (Parameter Fields, Select Expert
Record)
Prompt = requires a user to enter or select information that is then used in an associated
parameter.

Parameter = field used in a formula to generate a report with specific data.

Note –Most of the actions listed below may be performed in both the Design and the Preview
tabs. The instructions below state the recommended tab to use. If using a different tab, some steps
listed below may not apply.

How to add a parameter field

Adding a parameter field to a report is a three-step process:

1. Create a parameter field with a prompt


2. Add the parameter field to the Report or Page Header so the entered value from the
prompting query field will be displayed on the report
3. Add a field associated to the parameter field to the record selection criteria of the report -
without this step, the parameter field has no impact on the running of the report.

Note - you only need to add a parameter field if you want the report to prompt you to enter a
value. If there is no need for a prompt (search criteria for that field will always remain the same),
add the search criteria directly to the report by adding/editing a field to the record selection
criteria report.

How to create a parameter field with a prompt

The Field Explorer dialog box is used to insert fields – it appears on the right-hand side of the
report window. If it is not visible, click on the Field Explorer icon on the toolbar.

1. In the Preview tab, click on the “+” sign next to Parameter Fields in the Field Explorer dialog
box. This will list the current parameter fields (prompting query fields) associated with the
report.

Prepared by Finance Infrastructure and Transaction Services, Financial Services Page 1 of 6


Need HELP? Contact the Finance Help: [email protected] | 514-398-3463 October 2018
CRYSTAL REPORTS
Data Selection: Adding prompting query fields and related record
selection criteria to a report (Parameter Fields, Select Expert
Record)

2. Right-click on the heading Parameter Fields.


3. Click on New in the displayed menu.
4. The Create New Parameter dialog box will open.
5. Enter a name for the parameter in the Name field. Make note of this "Name" - it will be used
when adding a field to the record selection criteria (Step 8 below).

TIP: Naming convention


Start the name with “input_xxxx” to denote that this is a prompting query field. For example,
input_actv_code.

6. Select a Type from the pull down menu.


Note: Leave as "String" for values which will be a combination of characters and numbers
(for example, activity or location codes).
7. In the Value Options section, modify the Prompt Text – this text will appear in the Enter
Values window which prompts a user to enter search criteria.
Note: The prompt text automatically displays the word “Enter” followed by the parameter
name you entered at Step 5 – replace this name with a phrase (for example, Enter
input_actv-code: = Enter an Activity code:).
8. Click on OK. The new parameter now appears in the listing of Parameter Fields in the Field
Explorer.

How to add the parameter field to the Report Header Display so the entered value
from the prompting query field will be displayed

1. In the Design tab, decide where you wish to insert the parameter field in the Report or Page
Header - ensure there is enough space.
2. Drag and drop the parameter you just added in the Field Explorer to the Report or Page
Header

Prepared by Finance Infrastructure and Transaction Services, Financial Services Page 2 of 6


Need HELP? Contact the Finance Help: [email protected] | 514-398-3463 October 2018
CRYSTAL REPORTS
Data Selection: Adding prompting query fields and related record
selection criteria to a report (Parameter Fields, Select Expert
Record)

3. Add a text object as a label for this field.


o For instructions on adding a text object, consult CRYSTAL REPORTS - Inserting, deleting,
and moving text objects and fields
o For instructions on how to format text objects and fields, consult CRYSTAL REPORTS -
Modifying the formatting of text objects and fields.

BEFORE

AFTER

Prepared by Finance Infrastructure and Transaction Services, Financial Services Page 3 of 6


Need HELP? Contact the Finance Help: [email protected] | 514-398-3463 October 2018
CRYSTAL REPORTS
Data Selection: Adding prompting query fields and related record
selection criteria to a report (Parameter Fields, Select Expert
Record)
How to add the parameter field to the record selection criteria of the report

1. In the Preview tab, select Report > Select Expert > Record.
2. The Select Expert – Record window will open. The current selection criteria for the report
will be displayed along with the associated selection formula.
3. Click on New. The Choose Field window will open listing all fields used in the report followed
by all fields in the associated table(s).
4. Click on the field associated with the newly created parameter field (for example, we created
a prompting query field for activity code, so we now need to select this field in the report).

5. Click on OK.
6. Click to view the pull down options for refining the selection criteria for this field.

7. Select the option “is equal to”

Prepared by Finance Infrastructure and Transaction Services, Financial Services Page 4 of 6


Need HELP? Contact the Finance Help: [email protected] | 514-398-3463 October 2018
CRYSTAL REPORTS
Data Selection: Adding prompting query fields and related record
selection criteria to a report (Parameter Fields, Select Expert
Record)
8. The cursor will blink - Enter {?Name} since this field should be equal to the value entered by
the user.
{? } = denotes that this is a parameter field, prompting query field.
Name = the Name of the parameter field we created above.
For example, if the Name of the parameter field is input_actv_code, we must enter
{?input_actv_code}

9. Click on OK to save your changes and close the window.


10. If the Change in Record Selection Formula window opens, click on Use Saved Data.
Note: There is no need to refresh the report data if the data currently displayed in the report
meets your needs.
11. The Enter Values window will open and you will be prompted to enter a value for the newly
added field.

12. Enter a value.


13. Click on OK.
14. If prompted, re-enter your data warehouse password and click on Finish.
15. The data displayed in the report will now reflect the new selection criteria.

Prepared by Finance Infrastructure and Transaction Services, Financial Services Page 5 of 6


Need HELP? Contact the Finance Help: [email protected] | 514-398-3463 October 2018
CRYSTAL REPORTS
Data Selection: Adding prompting query fields and related record
selection criteria to a report (Parameter Fields, Select Expert
Record)
Running the report again with different values for the prompting query field(s)

1. Click on the Refresh icon in the toolbar or hit F5 on your keyboard.

2. The Refresh Report Data window will open.


3. Click the radio button next to Prompt for new parameter values.
4. Click on OK.
5. The Enter Values window will open containing the previously entered search parameters.
6. Enter a new value.
7. Click on OK.
8. The data displayed in the report will now reflect the new selection criteria.

TIP: For advanced users


Use the Formula Editor to add and modify record selection criteria – there is added flexibility with
the option to select functions, operators, and to manually enter formulas.

Prepared by Finance Infrastructure and Transaction Services, Financial Services Page 6 of 6


Need HELP? Contact the Finance Help: [email protected] | 514-398-3463 October 2018

You might also like