on 09-17-2008 3:57 PM
I've been using Crystal Reports 8.5 for about six months now.
I've been reformatting and reworking some reports that were supplied by our vendor.
Now I want to create one from scratch and I seem to have a brain block.
I know that if I create a parameter, the report will prompt me for a value when I run the report.
I know how to create the Parameter, but I can't figure out where to tell the report to base the report on that values (restrict the report to that value).
The report is based on a Stored Procedure that supplies a number of fields including BranchID.
I want the user to be able to enter the branch they want the report for, and I would also like if they don't enter any value that it include all branchIDs
Can someone get me started?
Also is there a good resource on the Internet or to purchase that would help me with CR 8.5.
CR 8.5 is dictated by our Business System Vendor...
Thanks
Kelvin
Hi Kelvin,
In the select expert, click on the show formula button, then the formula editor button.
In the top-right (ish) of the window, there is a dropdown that says 'exceptions for nulls' by default. Click the drop, and selct 'default values for nulls'.
You can then use an IF statement in your select expert to detect nulls.
IF not <null condition> THEN
(
the portion of your select expert relating to branch ID goes here.
)
You may need to look up 'default values' in the formula help, depending on the type of field your parameter is to determine what to use in the <null condition> spot in that formula. If it's a number, you need to test for 0. (IF {?Branch ID} <> 0), if it's a string, you need to look for the null string ("")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
- Create a parameter on the database field. Name the parameter as ex..u201D My Parameteru201D
- Click Select Expert on the Expert Tools toolbar. u2022 Choose Report > Select Expert from the menu.
- If the field you want to set record selection on is on your report, right-click that field and choose Select Expert from the shortcut menu.
- The Select Expert opens automatically for the field you select. You are not presented with a pick list of fields.
- If you have not selected a field by clicking it to make it active before using one of these methods, a dialog box opens, displaying the fields.
Tip: Your record selection criterion does not have to be based on a field in your report. You can choose any field from the database as a basis for record selection.
- Once you have indicated the field you want to set the record selection on and have clicked OK, the Select Expert opens.
- Select the filed on which your parameter is based on.
- Using the drop-down list, you can build selection criteria that meet your needs. Depending on the field you select, the available options in the drop-down list are: u201Cu2022 is equal to u201C.
- This option enables you to specify one specific value as the criteria, so that only matching records are included on the report;
In the list on the right hand side you have the option u201CMy Parameteru201D in the drop down list.
Click on ok and then refresh the report. The report will show the values in the report based on this parameter.
I hope this helps you.
Regards,
Prashant.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.