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!

Conditional suppress only if all column values are zero

Status
Not open for further replies.

rbarekere

Technical User
Mar 2, 2009
29
US
I would like to suppress whole column if dbfield value is 0.00. I was able to suppress it in common tab of format field by using formula if dbfield =0.00 then true else false.

But i would like to suppress column value only when all the values in column are equal to 0.00. Otherwise I would like to retain those 0.00.

Let me know how I can do this?

Your response is appreciated

-Thanks
Raghu
 
If you have no negative values, you can use a field suppression formula like this:

sum({table.field}) = 0

If you are checking this at the group level, you would have to add a group condition to the sum function.

-LB

 
I tried this and it worked.
Maximum({dbField}) = 0
Thanks for your response.

 
Hi,

I have a similar question:

I have 8 columns, if value of a "ROW" in the the 6th,7th and 8th COLUMN are '0' then I DON'T want the entire row in all 8 columns to be shown.

How would i do this?

Thanks
Jk
 
LB:

I tried your solution for the OP's question but it gives me an error. "a number field or currency amount field is required here". -- this is for a similar scenario NOT the one I have posted above.

why do we need to use 'sum'?

thanks
Jk
 
This is an entirely different question. What you need to do is go into the section expert->details->suppress->x+2 and enter the following if you mean you want the whole row suppressed if any one of three are zero:

{table.col6} = 0 or
{table.col7} = 0 or
{table.col8} = 0

If you want to suppress the row if all three are 0 then use:

{table.col6} + {table.col7} + {table.col8} = 0

Again, this assumes they are all of number datatype and that the numbers cannot be negative.

-LB
 
FANTASTIC -- THANKS a lot!!!!

LB,

I also want to be able to replicate what rbarekere posted.

why do we need to use 'sum'? can you please explain

I tried your solution for the "rbarekere's" question but it gives me an error. "a number field or currency amount field is required here".

please advise. -- my scenario is something like this:

There is one main report(hardware type aka.servers,phones,computers etc) using on-demand subreport to get details when user clicks on a particular hardware type.

One of the hardware not all columns are required, and so the request to conditionally suppress the column.

The option i think is to either use the above or make a separate sub-report for the hardware.

Also,

If i have 15 different kind of hardware where each hardware uses different columns -- will I then need to make 15 different ON-DEMAND sub-reports???

Please please advise.
Regards,
Jk
PS: where can I learn more about sub-reports and a better understanding of using formulas.Something more in detail then mr.hamaday.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top