×
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!
  • Students Click Here

*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.

Students Click Here

Jobs

filter records that have zero across all fields

filter records that have zero across all fields

filter records that have zero across all fields

(OP)
I am fairly new to crystal reports. Here is the situation. We use a canned program that creates crystal reports. I can modify the reports but the data coming in is something I cannot change on the backend. Basically the crystal reports data is a temp table that is created by a procedure and I cannot alter the requirements only the way the report uses the data.
My question is this. I have group on the report, within each groups detail are categories. How can I suppress these categories based on their name and not allow the sum, to sum up their values. For example. Under the group Tank Material, there are 5 sub groups or detail records. TM10, Tm20, Tm30 etc. I want to suppress TM20 and TM30's along with their values. I hope that make sense. How do I do this. I am using Crystal Reports XI

Thank you in advance

Micki

RE: filter records that have zero across all fields

you could change the selection criteria to exclude the TM20 & TM30 values.

select expert -> New -> your fields -> not one of -> enter desired values

RE: filter records that have zero across all fields

(OP)
I must apologize, that issue was what I thought my user wanted and now they have clarified it once I made the change. They want two field values in a record to change if the costcode is TM10 etc. My code is something like this

CODE

WhileprintingRecords;
if {Report.CostCode} = "TM10" Then
{Report.ActualQuantity} = 0 and 
{Report.EstQuantity} = 0 

I need these values evaluated before it sums up the group. Can you tell me what is wrong with my code. I have it under group selection selection formulas.
Right now it deletes all my records from the report.

RE: filter records that have zero across all fields

You should create a separate formula for each quantity, like this:

//{@Actualqty}:
if {Report.CostCode} = "TM10" Then
0 else
{Report.ActualQuantity}

//{@estqty}:
if {Report.CostCode} = "TM10" Then
0 else
{Report.EstQuantity}

Place each formula in the detail section instead of the corresponding quantity field, and then right click on each and insert a sum at the group level.

-LB

RE: filter records that have zero across all fields

(OP)
and what if I have multiple costcodes to do the same thing to....for example

[code]
//{@Actualqty}:
if {Report.CostCode} = "TM10" or "TM20" OR "CF10" Then
0 else
{Report.ActualQuantity}

//{@estqty}:
if {Report.CostCode} = "TM10" or "TM20" OR "CF10" Then
0 else
{Report.EstQuantity}

RE: filter records that have zero across all fields

(OP)
lbass

I don't understand how you place a formula in the detail section instead on the record or group section?

RE: filter records that have zero across all fields

Like this:

//{@Actualqty}:
if {Report.CostCode} in ["TM10","TM20","CF10"] Then
0 else
{Report.ActualQuantity}

You create the formulas in the field explorer->formulas->new and then drag them onto the detail section.

-LB

RE: filter records that have zero across all fields

(OP)
I got it to work by placing it at the field level. Thank you for all your help

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!

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