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

Returning unmatched records

Status
Not open for further replies.

Bennie47250

Programmer
Nov 8, 2001
515
US
Using Crystal version CR Developer version 14.0.4.738 RTM on a DB2 table

I’m converting a number field to text and prompting on the field. Sometime the converted number field results in a 0.

If I prompt for 235 for example, it will return records with a 0 and 235.

Why are the 0 records being returned and how can I stop it?

Thanks
Bennie
 
Are you using the prompt in a record selection formula or in a conditional formula? If some condition for a number field is not met, the default will be zero. Please show the formula you are using and explain where you are creating it.

-LB
 
The number field I'm converting to text is using this formula

Right (ToText({MyNumberField},0),3) Name of the formula is @ShipToArea. This is just a field on the report.

I also have a Parameter that is prompting for this value. Now in an attempt to "fool" Crystal to allow for more that one value, my select statement is
{@ShipToArea} in {?ShipToArea} and it is a string parameter

When prompted, I'm entering the values like 233, 234, 191

Not sure what I did but it seems to be working now.

If you have any suggestions on a better way to allow for an IN clause to be used with a prompt, would love the hear them.
 
You don’t need to ‘Trick’ Crystal to accept multiple values. Not sure why you are converting to text. You could just be using a number parameter, set up as a multiple value parameter. The report would be much faster doing it this way. You also don’t have to use “in”—you could just use an = sign and select multiple values—although it doesn’t hurt to use “in”.

-LB
 
lbass,

The report runs automatically without any human interaction and it is getting the values from a table. Experimenting on my own it did not appear that I could do it as you described. Do you have any experience with a setup like this and if you do, will what you describe work?

Also I converted it text so I could enter ALL to get all territories on one report but I could have just as easily have used 999.

 
If there is no human interaction with the report, how is the response to the parameter generated?

-LB
 
We use a 3rd parts report scheduler (rePORTAL) and is has a feature called report bursting. Basically when the report runs it reads a table/field that has the parameters and the email address where the report is to be sent to.
 
Sorry, I’m not familiar with that. You said earlier that it was working, so you are probably all set then.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top