Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

CR 8.5 Newbe questions on restricting records

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...



Former Member
Former Member replied

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 ("")

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question