Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Suppressing Criteria On Cross-Tab Fields

Posted on 2001-06-14
3
Medium Priority
?
649 Views
Last Modified: 2007-11-27
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.
0
Comment
Question by:jtrapat1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 6193221
Why not substitute a formula for the comment along the lines of

if {agent}="Allen"
  ""
else
  {comment}
0
 

Author Comment

by:jtrapat1
ID: 6195747
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.
0
 
LVL 12

Accepted Solution

by:
DRRYAN3 earned 800 total points
ID: 6196030
Maybe you need to step back in the process a little bit and modify the source of the cross-tab query such that comments for Allen are not included.  Otherwise, you will have to use a formula for each cell in the report where you want the supression to take place.

If you attempt to place the crosstab field directly on the report, then you will have to use the CurrentFieldValue.  If you remove the data field and place a formula on the report instead, the syntax I gave you will work just fine.

Generally speaking, you do not have to trim the text coming into crystal unless you know that you have padded it in the data source.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question