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!

Crystal Parameter With Select Expert 1

Status
Not open for further replies.

shoedog

Technical User
Jun 9, 2005
8
US
Using Crystal XI WITH SQL 2005, I need to create an option to select items which have a value >0 in IV00101.USCATVLS_2. If value is blank I do not want the items in the report. The field is renamed 'DISC' and the values in the field represent discounted prices. Any help would be great. Thanks, Jayne
 
Instead of using the select expert, go to report->selection formula->record, and if this is a number field, enter:

{table.field} > 0

By entering a criterion like this, you will automatically eliminate any null values. Not sure how you renamed the field, but replace {table.field} with your actual field.

-LB
 
Just realized you referenced a parameter, so I guess you want to use:

{table.field} > {?parameter}

-LB
 
Thanks for your help. This worked to eliminate items that are not dicounted and only print the items with a value in that field. I want to make it an option to print all items or only the discounted items. I was trying to do this as a parameter seletion using DISC as a parameter field. Jayne
 
If I'm following you, you either want all discounted items or all items. Set up {?Disc} as a string parameter with two options: "All Items" or "Discounted Items Only". Then go to report->selection formula->record and enter:

(
(
{?Disc} <> "All Items" and
IV00101.USCATVLS_2 > 0
) or
{?Disc} = "All Items"
)

-LB
 
You got me on the right path. I changed your formula sightly, this is what I ended up with: (if {?Disc} = "DISC" then {IV00101.USCATVLS_2} > "$0" else {?Disc} = "All"). Thanks very much for your help. Jayne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top