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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting "Please enter a number" message after parameters window

Status
Not open for further replies.

xcmuchip

Programmer
May 31, 2001
70
I have a parameter field that is defined as a numeric multiple discrete value. I don't want this field to be mandatory. However, if I leave it blank and click the OK button, I get a window that pops up telling me to enter a number. The selection record code for this parameter is...

(if Not IsNull({?Plant}) then {ACTP840.PRPLT} = {?Plant} else True)

Any ideas? TIA

 
There is no such thing as a non-mandatory parameter field. You can have the field default to zero, and then use nested if-then-else logic to deal with the answer.

How about : If {?plant}<>0 then {ACTP840.PRPLT} = {?Plant}

That would give you only those plants that were entered in response to the parameter prompt, unless the value was left at zero, in which case it would give you all the plants. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
Actually, I had that code first. I still get the same window. It makes the user enter a number for the parameter. My string parameters can be left blank. The way my record selection is coded, my parameter fields can be left blank for all records. Here is my record selection formula as a whole...

(if {?Stock} <> &quot;&quot; then {ACTP840.PRPRD} = {?Stock} else True) and
(if {?Group} <> &quot;&quot; then {ACTP840.PRGRP} = {?Group} else True) and
(if {?Plant} <> 0 then {ACTP840.PRPLT} = {?Plant} else True) and
(if Not IsNull({?% Difference}) then {ACTP840.DIFF} = {?% Difference} else True)

I changed plant to try my original code. Difference gets the same message. Stock and Group are my string parameters that can be blank. I think my answer is to somehow default zeros (without using default values button if possible) into my plant and difference fields.

Thanks for the response. Any other ideas?
 
Looks like my only solution is to use the default button to set default values of zero. I just changed my report to do just that and everything works fine.

I tried to define these two parameters as strings, but it did not select records correctly. It did not find records for the selected plant or difference range.

Any other suggestions is appreciated for future reference.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top