jtrapat1
asked on
Suppressing Criteria On Cross-Tab Fields
I am using CR8 with SQL Server 7.
I have several fields that are coming from cross-tab queries and I need to suppress a certain value.
My report layout looks like this:
(Both the Agent field and Comments field are coming from two separate cross-tabs, both based on Num, the key)
Num Desc Agent Comments
A0010 desc Jones There is work...
Smith Still pending...
Allen Job is in...
Now, I have one particular agent, Allen who would like to hide his comments from showing up on the report.
I tried right-clicking on the comments field and adding a formula to the Suppress, Object_Visibility tab:
if {Agent} = "Allen" then false
else true
But this didn't work - when I ran the report, it suppressed all of the comments fields, for just that one record!
How would I get this suppression "in sync" from both cross-tabs, so that I would suppress just the Comments field for the value of one Agent, Allen?
Thanks in advance.
I have several fields that are coming from cross-tab queries and I need to suppress a certain value.
My report layout looks like this:
(Both the Agent field and Comments field are coming from two separate cross-tabs, both based on Num, the key)
Num Desc Agent Comments
A0010 desc Jones There is work...
Smith Still pending...
Allen Job is in...
Now, I have one particular agent, Allen who would like to hide his comments from showing up on the report.
I tried right-clicking on the comments field and adding a formula to the Suppress, Object_Visibility tab:
if {Agent} = "Allen" then false
else true
But this didn't work - when I ran the report, it suppressed all of the comments fields, for just that one record!
How would I get this suppression "in sync" from both cross-tabs, so that I would suppress just the Comments field for the value of one Agent, Allen?
Thanks in advance.
ASKER
Dr.,
Thanks for the response;
I tried this formula (and lots like it) but I'm fairly new to Crystal so I don't know how the Crystal syntax differs from VB syntax or Basic Syntax.
My co-workers say that you have to "trick" Crystal to get the desired data.
I got a little closer when I tried this formula:
If{Agent}="Allen" then
CurrentFieldValue = ""
else
CurrentFieldValue = {Comments}
But this only gave me the desired output for the one particular row that I edited; when the report encountered another record with this "Allen" value, it didn't suppress the comments.
Like I said, both of the fields I'm trying to line up vertically across the report are in cross-tabs;
So, I have to use CurrentFieldValue, don't I?
Also, don't I have to use rtrim or other string functions to make sure I compare to the exact value?
Thanks.
Thanks for the response;
I tried this formula (and lots like it) but I'm fairly new to Crystal so I don't know how the Crystal syntax differs from VB syntax or Basic Syntax.
My co-workers say that you have to "trick" Crystal to get the desired data.
I got a little closer when I tried this formula:
If{Agent}="Allen" then
CurrentFieldValue = ""
else
CurrentFieldValue = {Comments}
But this only gave me the desired output for the one particular row that I edited; when the report encountered another record with this "Allen" value, it didn't suppress the comments.
Like I said, both of the fields I'm trying to line up vertically across the report are in cross-tabs;
So, I have to use CurrentFieldValue, don't I?
Also, don't I have to use rtrim or other string functions to make sure I compare to the exact value?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if {agent}="Allen"
""
else
{comment}