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

suppressing the second record that matches the formula criteria

Status
Not open for further replies.

jat3333

Programmer
Apr 17, 2015
13
0
0
US
I have been struggling with this report for days and found this site, useful for most of my problems with it but I can't seem to find the right solution to fix the final piece of it.

I have 4 groups
experiment
experiment group name
experiment subject ID
Day

I have the following in the footer of my Day and these work great: Day, result of the test for that day
Day 1 = 0
Day 2 = 0.5
Day 3 = 0.5
Day 4 = 2

I have used a running total to get the minimum value and created a formula
If ({table.results} = {#min})
then
{day}
else
0

and placed a suppress on if {@day} = 0

this works great but in the instance where I have 2 values that are the minimum the report is now giving me both days 2 and 3 when I only want to see day 2.


Any suggestions are greatly appreciated.

thanks
J

 
sorry Crystal version XI

And the I don't want to see 0 as the minimum value, thus I would like to have a field return day 2 only the the other fields suppressed(including day 3 where the values are the same) and this value will be placed either in the footer of either the experiment subject ID or Day

I have tried using the {table.results} = previous({table.results} ) and this, nor the Next function do not work
 
I'm not sure why using the previous and next functions would not work in this situation.
Have you tried creating a separate formula to mark the records that you don't want to keep.
Code:
{table.results} = previous({table.results} and {table.subjID} = previous({table.subjID}) then 'Suppress'
and then add an Or condtion to your suppression formula
{@day} = 0 or {@newformula)= 'Suppress'

Gordon
Crystalize
 
I tried this and no luck. It seems to not recognize this at all because it is leaving it completely empty. When I add an else 'stuff' it returns this bypassing the 'Suppress'.

I have attached a couple of screenshots to help clarify what is going on.

Thanks for the assistence

J
 
 http://files.engineering.com/getfile.aspx?folder=17bdf46e-1439-4c29-ad23-9f41284ba65e&file=report.docx
Previous functions work on the detail record and if the day group has multiple records then this would explain the results.
So we can use a variable instead.
Create a formula placed in the SubjectId Group Header.
Code:
WhileprintingRecords;
BooleanVar Result := false;
Create a formula and place it in the day Group;
Code:
WhilePrintingRecords;
BooleanVar Result;
StringVar Display;
if Result = false then Display := {@Days} else Display := '';
if {@day}<>0 then Result = true;
Display
I haven't tested but something along these lines may work

Gordon
Crystalize
 
I tried this a few different ways and I am still getting the same answer. Any other suggestions?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top