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!

Number Parameter

Status
Not open for further replies.

dbielenda

MIS
Nov 15, 2001
119
US
Why is it that Crystal forces me to enter in a parameter when its value is set to number? I have this very simple formula:

{?Order Number} = {TABLENAME.FIELD}

What do I have to do so Crystal does not ask me, "You must enter a value for this field."

Thank you!
 
Hi,

You may need to define defaults for a parameter.
This is usually generated when creating the parameter, and is normally derived from the values in your field.
This does mean that the first value in the dropdown list will always be the default value. You will also need to manually update your parameter if your selection changes.

Hth,
Geoff
 
You must always enter a value for a parameter field, thats what parameters are for. Typically after entering the parameter value, you go to the record selection formula and reference the parameter field so that, in oyur case, you would only see the records that have that particular order number.

What are you trying to accomplish with your parameter field?

Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
dgillz,

I have two parameters in my report:

{?Warehouse} = {SAW777A.WHSA}
OR
{?Order Number} = {SAW777A.ORDNOA}

If I enter in a warehouse and leave order number blank then proceed to click OK, Crystal asks me to enter in a value. I would like to get around this. I did not want to have to enter in a warehouse and an order number. Did this make sense? If not, then I will clarify better.

Thank you.
 
Hi,

Try defaulting the parameters to a non valid order number,eg. 0

You can then have the user supply either one of the two parameter values.

The formula would be

(if {?Order Number} = 0
then {?Warehouse} = {SAW777A.WHSA}
else {?Order Number} = {SAW777A.ORDNOA})


Hth,
Geoff

 
Hi,

You could achieve the same effect by using the first paramater to define which field you wish to test...

(if {param1) = 1
then {SAW777A.WHSA} = {param2} // Warehouse
else {SAW777A.ORDNOA} = {param2}) // Order Number

Hth,
Geoff

 
Fox is correct - one parameter will do, and you can change your grouping based on that same parameter if need be. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
Another issue that I will be experiencing is that this report will be used by a third party tool. A "user" will not be entering a parameter, rather, it will be passed in and the report is sent to a printer. A warehouse parameter will always be passed, however, the order number is optional. I am not sure that this forumla will work. I will need to test further..Thank you for all your help. s-)
 
FoxG,

I used this formula:

(if {?Order Number} = 0
then {?Warehouse} = {SAW777A.WHSA}
else {?Order Number} = {SAW777A.ORDNOA})

and Crystal is still prompting me to enter in a value. It will not let me leave the order number blank. I added this formula to the Record Selection Formula Editor and made the parameter type a number. Did I do something wrong?

 
db-

did you give a default value of 0 to {?Order Number} ? Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
I did give it a value of zero and now it works. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top