• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1270
  • Last Modified:

Crystal Report detail section suppression not working.

I have placed this formula inside the  section expert, details section, common tab, suppression area, formula button.

(({V_ARPB_TX_ACTIVITY.PROC_QUANTITY})=0
   and ({@Charges})=0
 and ({@Adjs})=0
 and ({@Payments})=0
 and ({@Net}) =0)
and {?Show All Details} = "No"

The Show all details = no works perfectly by itself.
The suppress detail lines where all quantities = 0 works perfectly by itself.
But combining the two doesn't work at all.  All details show and will not suppress.
0
Becky Edwards
Asked:
Becky Edwards
  • 2
  • 2
  • 2
  • +1
1 Solution
 
CrashmanCommented:
make sure of the values of the combination is cero
0
 
mlmccCommented:
Try adding ( ) around the last part

(({V_ARPB_TX_ACTIVITY.PROC_QUANTITY})=0
   and ({@Charges})=0
 and ({@Adjs})=0
 and ({@Payments})=0
 and ({@Net}) =0)
and ({?Show All Details} = "No")

If you have ?Sow All Details as a boolean parameter the AND would take precedence

mlmcc

0
 
James0628Commented:
 mlmcc,

 If {?Show All Details} was a boolean param, he'd get an error when CR tried to compare it to "No".  Or, if CR evaluated the formula like (... and {?Show All Details}), he'd get an error when it tried to compare the result of that to "No".


  bjrhart,

 The question is, how do you want those two tests to combine?

 Using AND, the section will only be suppressed if PROC_QUANTITY and all of those formulas are 0, _and_ the user enters "No" for {?Show All Details}.  If any of those are not 0, _or_ the user does not enter "No", the section will not be suppressed.  In this context, a better name for {?Show All Details} might be something like {?Show 0 Amount Records}.

 If that's what you wanted, then the formula looks OK.  The only potential problem that I can think of is if a field is null, but if all of those = 0 tests work by themselves, then nulls don't seem to be a problem.

 OTOH, if you want to suppress any records where all of those values are 0, or _all_ records if the user enters "No" for {?Show All Details}, then you need an OR before the parameter test.

({V_ARPB_TX_ACTIVITY.PROC_QUANTITY}=0
   and {@Charges}=0
 and {@Adjs}=0
 and {@Payments}=0
 and {@Net} =0)
or {?Show All Details} = "No"

 FWIW, in this case, I think {?Show All Details} might be better named {?Show Details}.

 I took out the () that you had around the field and formulas.  They serve no purpose (as far as CR is concerned), and I think they make the formula a bit harder to read.

 James
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Becky EdwardsEpic Clarity DeveloperAuthor Commented:
Thank you everyone.  

The right question as James points out is - how do I want the 2 tests to combine.  I don't care what happens to all the zero quantities if the detail section is suppressed.  What I want is, if the person says Yes to Show all details, that he/she ONLY sees lines of data where there is something other than all zeros.  In other words, as long as there is something in ONE of the formulas besides zero, I want the line of data to appear.  If ALL data in that line of formulas equals zero, then don't bother showing it.  

Does that make sense?

0
 
mlmccCommented:
His last formula should work then
//Suppress if all are 0
({V_ARPB_TX_ACTIVITY.PROC_QUANTITY}=0
   and {@Charges}=0
 and {@Adjs}=0
 and {@Payments}=0
 and {@Net} =0)
or
//Or suppress if show details is false
{?Show All Details} = "No"

mlmcc
0
 
Becky EdwardsEpic Clarity DeveloperAuthor Commented:
Thank you again !!!!!
0
 
James0628Commented:
You're welcome.  Glad I could help.

 James
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now