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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Suppression Not Working!

Status
Not open for further replies.

JenB

MIS
May 17, 2002
12
GB
Help!

I am failing dismally to get this to work correctly.

I have 4 formulas, all returning True or False (they are actually 2 pairs of formulas evaluating next and previous records).

I am trying to conditionally suppress the detail lines depending on the results of the formulas. I want to see records where 1 of each pair (or both) is true.

Basically if in the Details Format Section I am suppressing..

(formula1 = false or formula2 = false)
and
(formula3 = false or formula4 = false)

This doesn't appear to work, as I get results where both of a pair is false, but some records do come through correctly.

Please Help

Thanks in advance

Jen
 
I just need to clarify what you expect to see here:

formula1 formula2 formula3 formula4
-------- -------- -------- --------
false false false false
false true true false

Are you saying that you would expect to see row 2, but not row 1, but what you are in fact getting is both rows?

If so, (and by all means, please set me straight if you think I've misunderstood you) try using this formula for your conditional suppression instead:

(( formula1 = false and formula2 = true)
or
formula1 = true and formula1 = false)
and
(( formula1 = false and formula2 = true)
or
formula1 = true and formula1 = false)

Naith
 
I think the penny's finally dropped, and I understand what it is you're expecting to see now.

Just put in another condition for each pair, and you'll get what you want:

((( formula1 = false and formula2 = true)
or
formula1 = true and formula1 = false)
or
formula1 = false and formula2 = false)

and
((( formula1 = false and formula2 = true)
or
formula1 = true and formula1 = false)
or
formula1 = false and formula2 = false)

Sorry I led you a bit around the houses before. I just wasn't seeing the big picture. :p

Naith
 
For Pete's Sake! I'm not awake at ALL today!

If you're getting rows where both formulas in a pair are false, and you want to see rows where one or both of a pair are true, then your suppression is inverted. Simply switch the values in your original formula.

i.e.:

(formula1 = true or formula2 = true)
and
(formula3 = true or formula4 = true)

Ladies and gentlemen, I thank you.

And now I will be petitioning for a 'Remove Your Post' button...

A Very Embarrassed Naith
 
Hi I don't see anything inherently wrong with this per se but perhaps it is an evaluation timing problem.

I would make certain that EACH formula below began with "WhilePrintingRecords"

Also begin this formula with the same

WhilePrintingRecords;
(formula1 = false or formula2 = false)
and
(formula3 = false or formula4 = false);

part of the problem with diagnosing your problem is that you have not shown us the formulas for 1 to 4...so we must assume they are working properly.

Jim Broadbent
 
Thx for the (numerous) posts Naith!

The problem runs a bit deeper than that, I have tried swapping the conditions already.......

The problem is that it is bringing back unpredictable results. Some records appear correctly, others appear (for example I have seen records where all 4 formulas are false, even tho I am suppressing false!) wrongly.

Because it is so hit and miss, it is therefore difficult to ascertain the real issue. Has anyone else had problems with conditionally suppressing detail lines on formula results?

PS. I have tried this without using formulas and got rubbish results as well.

Hope this helps to clear up my dilemma a bit....

Thx!

Jen
 
What version of Crystal are you using. I had a pronblem with this once on Crystal V8 and it wsa resolved by upgrading to 8.5 Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
The formulas are working correctly, they are all sat on the details lines and reporting fine, myself and a colleague checked over 50 records of each formula to ensure they were right.

I just can't get the suppression to work properly! We have tried numerous variations, with or without the 4 formulas but we still can't get it to work.....

Ta!

Jen
 
What are the formulas? And did you try adding the WhilePrintingRecords to them all + the conditional suppress?? Jim Broadbent
 
The whileprintingrecords still produced the dodgy results....
e.g. got results where both formula 1 & 2 were false!

Formulas..........
formula1 {Serial Num}= next({Serial Num})
formula2 {Serial Num}= previous({Serial Num})
formula3 {Close Date}+5 >= next({In Date})
formula4 {In Date}-5 <= previous({Close Date})

Hope this helps you help me!!!!

Ta!

Jen
 
Are close date and In Date actually dates? I have seen some programs that store the dates as 8 digit integers in the YYYYMMDD format. Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
well I see no tests for nulls in your formulas and there will be occurances when you have null values for sure when testing using Previous and Next (at the beginning and end of the record set are obvious times)

And your date values are confusing...you are adding +/- 5 of what?? days, months, years ?

One thing that you can do is try and isolate your problem by eliminating one half of the suppress critera

IE...test just using the date formulas and then test just using the SerNum formulas...to see if one set or the other is the Bad Guy. Jim Broadbent
 
Your formulas look fine, given that we know nothing about your dates.

If you'd have showed us the return of each formula, the value of each field in each formula, and the results of your suppression formula (don't use it in suppress, just drop it into a new formula and display it's results alongside the data - returning true or false), it would be much easier.

Suppression works, sometimes that Boolean logic trips us up, you probably know, but it suppresses where the condition is true.

Once the formula evaluates correctly (true or false), copy it's contents into the conditional suppression formula area (X-2), and delete the testing suppression formula.

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top