INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Help with Suppressing a field

Help with Suppressing a field

(OP)
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

RE: Help with Suppressing a field

Hi Bennie

This should work:

CODE --> Conditional_Suppression_Formula

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

Hope this helps.

Cheers
Pete

RE: Help with Suppressing a field

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close