Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter Fields "OR"

Status
Not open for further replies.

ChewDoggie

Programmer
Mar 14, 2005
604
US
G'morning,

I have been asked to create a report using Crystal Reports XI Release 2 to meet the following requirement:

... for 'Part Number' AND 'LineCode' AND ('SerialNum' OR 'EDISerialNum')

The challenge is with the last portion of the requirements, 'SerialNum' OR 'EDISerialNum'. I know how to prompt for 'SerialNum' AND 'EDISerialNum' are both required and I know how to prompt for 'SerialNum' and 'EDISerialNum' are both optional, but how do I prompt to make EITHER 'SerialNum' OR 'EDISerialNum' REQUIRED ?

Thanks !

Chew

10% of your life is what happens to you. 90% of your life is how you deal with it.
 
OK, I THOUGHT I knew how to prompt for 'SerialNum' AND 'EDISerialNum' when both are required and I THOUGHT I knew how to prompt for 'SerialNum' and 'EDISerialNum' when both are optional, but was mistaken.

I added the parameter Fields and dragged them to the report, not knowing that I had to build a 'select' statement via the 'Select Expert' to filter the records. Once I realized this, I created a formula that looks like this:

Code:
{tblFNBarCode.PartNum} = {?Part Number} and
{tblFNBarCode.LineCode} = {?Line Code} and
({tblFNBarCode.SerialNum} = {?Serial Number} or {tblFNBarCode.EDISerialNum} = {?EDI Serial Number})

And it works like a charm.

Chew

10% of your life is what happens to you. 90% of your life is how you deal with it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top