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!

Formula using Parameter Fields and why results differ?

Status
Not open for further replies.

SmokeEater

Technical User
Feb 14, 2002
90
CA
I have a report with the following formula in it:
{ASSETLCF.SITEID} = {?Site ID} and
{PARTSLCF.PARTTYPE} = {?Part Type} and
{ASSETLCF.PARTNUMBER} = {?Part Number} and
{ASSETLCF.LOCATIONSTATUS} in ["IN STOCK", "OUT FOR REPAIR"] and
{INAIR_CL.ITEMCAT} in ["PQC_PARTTYPE_LIST"] and
{PARTSLCF.DESCRIPTION} = {?Part Description}

When the report is run the parameter fields ask for information. If I answer with no lower bounds and end of range of ZZZZ I get a certain number of records returned.

If I modify the formula and remove the last of the parameter fields, {PARTSLCF.DESCRIPTION} = {?Part Description}. The formula would look like this

{ASSETLCF.SITEID} = {?Site ID} and
{PARTSLCF.PARTTYPE} = {?Part Type} and
{ASSETLCF.PARTNUMBER} = {?Part Number} and
{ASSETLCF.LOCATIONSTATUS} in ["IN STOCK", "OUT FOR REPAIR"] and
{INAIR_CL.ITEMCAT} in ["PQC_PARTTYPE_LIST"]

I then refresh the report. The report returns more records.
why would this happen?

To my way of thinking both ways are asking for all the data.
 
Hello,
from what you have posted, it seems that when you are using
{PARTSLCF.DESCRIPTION} = {?Part Description} you are specifying specific part descriptions required to return. when this parameter is removed, records return no matter what the part description is, thus more records.. for example you could have a part description that is " " or other similar series which would not be caught by your lower bound. Seagate Certified RCAD Specialist.
-Bruce Thuel-Chassaigne
roadkill150@hotmail.com
 
"{PARTSLCF.DESCRIPTION} = {?Part Description}

When the report is run the parameter fields ask for information. If I answer with no lower bounds and end of range of ZZZZ I get a certain number of records returned."

Is {?Part Description} a range parameter?? If it is then I think it should be

{PARTSLCF.DESCRIPTION} in {?Part Description}

then the parameter would perform as expected. Probably what is happening is the {PARTSLCF.DESCRIPTION} is being compared to the upper or lower bound or both of the range for {?Part Description} but not the values inbetween.

this is why you get more values when this filter condition is removed.

Jim
JimBroadbent@hotmail.com


 
When your answers to the parameter propts are no lower bound and ZZZZ are you answering the description prompt field that way or all fields that way? Software Support for Macola, Crystal Reports and Goldmine
dgillz@juno.com
 
I am answering all prompts by clicking on the check box "no lower bound" and then entering ZZZZ in the end of range field. The window at the bottom of the "Enter Parameter Values" screen shows:
Value/Start End
( ZZZZ)


 
Perhaps my question should be.
Does "no lower bound" include an empty or null value in a field?
 
I think that checking "no Lower Bound" will still skip null values. You can test that in your own data pretty easily, however.
Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
If I remove all parameter fields from the formula so it looks like this:
{ASSETLCF.LOCATIONSTATUS} in ["IN STOCK", "OUT FOR REPAIR"] and
{INAIR_CL.ITEMCAT} in ["PQC_PARTTYPE_LIST"]

I get 28,151 records returned. With the full formula I get 26,767 records returned.
 
That fits with nulls being excluded by some of your criteria. Do any of the fields used for selection have nulls?
It would be easier to see if you narrowed the scope of the report. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I checked, using Microsoft Access, for nulls or empty fields.
All of the fields used in my formula are populated, there are 28,151 records in total.
 
I would add the criteria back, one line at a time, and see which one is causing the drop in records. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
"I am answering all prompts by clicking on the check box "no lower bound" and then entering ZZZZ in the end of range field. The window at the bottom of the "Enter Parameter Values" screen shows:
Value/Start End
( ZZZZ)"

I'm sorry but I don't know what parameter you are refering to here...is it {?Part Description}???

if so TRY this

{PARTSLCF.DESCRIPTION} in {?Part Description}

instead of

{PARTSLCF.DESCRIPTION} = {?Part Description}

Jim

 
Jim,

The '=' works the same as IN starting with Version 7, when they introduced range and multiple parameters. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top