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

Help with Suppressing a field 1

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 really like how Crystal allow you to Suppress a file but sometimes I have difficulty getting the syntax correct. This is one of those times.

Have a report that prompts for ship to territories, it can also show all records by entering ALL in the prompt. What I want to do is when prompted for a ship to territory to suppress the field if the sales territory if different from the values entered in the prompt.

For example, at the prompt we will enter 193, 233, 234 (for the ship to territory) and the sales territory from some of the records could be 200. For the records that have a sales territory of 200, I want to hide a field. This is easily done using the formula “Not SalesTerritory in ?ShipToArea”

However, when I run the report for ALL, the field is suppressed (as sales <> ship) but I want to see the values when ran for ALL.

Please help with the proper syntax.

Thanks
Bennie
 
Hi Bennie

This should work:

Code:
{?ShipToArea} <> 'All' and
Not {Table.SalesTerritory} in {?ShipToArea}

Hope this helps.

Cheers
Pete
 
You should not use suppression unless you need those other values in your report for some other reason. It just complicates other things—like creating summaries. I would just set up a record selection formula like this:

(
(
{?shiptoArea} <> ‘All’ and //or 0 if you convert to a number parameter
{table.SalesTerritory}={?ShiptoArea}
) or
{?ShipToArea}=‘All’ //or 0 if a number parameter
)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top