Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: suppression formula not working Post Reply Post New Topic
Page  of 2 Next >>
Author Message
Getch
Groupie
Groupie


Joined: 26 Dec 2008
Online Status: Offline
Posts: 47
Quote Getch Replybullet Topic: suppression formula not working
    Posted: 13 Jan 2011 at 6:17am
Hi All,
 
I'm working on a report and it has a several report footers. One has a suppression formula that is not working as expected.
 
The formula is:
If Maximum ({SOURCE.sou_roth_in}, {PLA.pla_code_cid})=True then False else True
 
The source field is true, false or null
The Pla field are 3 character plan identifier codes.
 
The footer conatains a text field that should be shown when the formula returns True and suppressed for any other result.
 
I've tried many configuration of that formula but I can only get it to be eith always on or always off.
 
Any suggestions? 
Newbie reports
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 13 Jan 2011 at 6:52am
I am curious what the Maximum function is used for.


Edited by Keikoku - 13 Jan 2011 at 6:57am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Jan 2011 at 7:04am
My guess is the NULL values are killing it.
in the suppression formula flip the pick list option to 'use default values for Nulls'
also you can simplify your formula to:
NOT(Maximum ({SOURCE.sou_roth_in}, {PLA.pla_code_cid}))
IP IP Logged
Getch
Groupie
Groupie


Joined: 26 Dec 2008
Online Status: Offline
Posts: 47
Quote Getch Replybullet Posted: 13 Jan 2011 at 7:22am
Originally posted by Keikoku

I am curious what the Maximum function is used for.
 
I am too. I didnt write this report, I'm just trying to get it to work as it appears it was intended.
 
DBLANK,
 
I toggled the nulls option and that didnt help.
 
I copied and replaced the formula with your suggestion and that didnt work either.
 
 
Newbie reports
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Jan 2011 at 7:30am

From what I can tell based on what you have posted the {SOURCE.sou_roth_in} is a boolean that may also have Null values

there is a group using the {PLA.pla_code_cid} field
The Maximum ({SOURCE.sou_roth_in}, {PLA.pla_code_cid}) will return TRUE if any row in the {PLA.pla_code_cid}group had TRUE in the {SOURCE.sou_roth_in} field and FALSE if ALL rows had False.
Therefore there is some text in teh group footer that you want to display when all the rows for that field = FALSE/
Null values can kill formulas if they are not accounted for.
create a formula field as:
NOT(Maximum ({SOURCE.sou_roth_in}, {PLA.pla_code_cid}))
and place it in the {PLA.pla_code_cid} group footer and see if it is giving you the correct TRUE FALSE for the each group.
 


Edited by DBlank - 13 Jan 2011 at 7:30am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Jan 2011 at 7:33am
Note that the
NOT(Maximum ({SOURCE.sou_roth_in}, {PLA.pla_code_cid}))
formula inverts the MAximum boolean for the group. therefore if any row had TRUE the formukla should return False. If all rows had False it should return True.
IP IP Logged
Getch
Groupie
Groupie


Joined: 26 Dec 2008
Online Status: Offline
Posts: 47
Quote Getch Replybullet Posted: 13 Jan 2011 at 7:35am
Originally posted by Keikoku

I am curious what the Maximum function is used for.
 
Just got it on this. In the source field, there can be up to 15 sources per each plan. Each being either true or false.
 
If any source in plan A, for example, is True then the section should show.
Newbie reports
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Jan 2011 at 9:45am
Did you get it to work or do you still need assistance?
IP IP Logged
Getch
Groupie
Groupie


Joined: 26 Dec 2008
Online Status: Offline
Posts: 47
Quote Getch Replybullet Posted: 13 Jan 2011 at 9:50am
Originally posted by DBlank

Did you get it to work or do you still need assistance?
 
DBLANK, you hit the nail right on the head in your accessment of the report.
 
I have not had a chance to apply a couple additional suggestions yet as I was sidtracked by another project.
 
I think I may have it "backwards" in the report. Thanks for the info. I'll post up again as soon as I can get back to the report.
Newbie reports
IP IP Logged
Getch
Groupie
Groupie


Joined: 26 Dec 2008
Online Status: Offline
Posts: 47
Quote Getch Replybullet Posted: 14 Jan 2011 at 6:33am
Originally posted by DBlank

From what I can tell based on what you have posted the {SOURCE.sou_roth_in} is a boolean that may also have Null values

there is a group using the {PLA.pla_code_cid} field
The Maximum ({SOURCE.sou_roth_in}, {PLA.pla_code_cid}) will return TRUE if any row in the {PLA.pla_code_cid}group had TRUE in the {SOURCE.sou_roth_in} field and FALSE if ALL rows had False.
Therefore there is some text in teh group footer that you want to display when all the rows for that field = FALSE/
Null values can kill formulas if they are not accounted for.
create a formula field as:
NOT(Maximum ({SOURCE.sou_roth_in}, {PLA.pla_code_cid}))
and place it in the {PLA.pla_code_cid} group footer and see if it is giving you the correct TRUE FALSE for the each group.
 
 
I'm confused now. I had already created a formula like you said in a separtate report just to see if the output was what I was expecting to see. When I did the same inside the report, I'm getting something else.
 
Ex. in the sep report, the formula indicates TRUE which is what I expect. For plan reporting, the on the live report, same formula is indicating FALSE.
 
Any thoughts/suggestions?
Newbie reports
IP IP Logged
Page  of 2 Next >>
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.063 seconds.