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

Suppression formula help please - Crystal 10 2

Status
Not open for further replies.

jp3333

Technical User
Jun 22, 2007
11
US
I can't say that I am new anymore but I still have trouble with formulas!

I have a suppression formula in a report that looks like this:

{pry8_flowsheet;1.report_section} <> '100_phys_attributes'

and returns multiple values. Of these values I need to suppress all but the first and last.

Can you help me please?



 
A suppression formula doesn't return anything. Do you mean that after using the above formula you still have multiple records but that you only want the first and last of what remains? Or do you mean that you only want the first and last of a specific field, and that your current suppression formula isn't working properly?

What determines the sequence of records, since 'first' and 'last' will depend upon this?

-LB
 
Sorry I wasn't clear, I do mean that after using the above formula I still have multiple records but only want the first and last of what remains? It is a date/time that indicates the order.

 
Please post sample data w/o the suppression formula and desired results.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 

you can write a formula in details - section expert -suppress

PreviousIsNull (your field value)
or
NextIsNull (your field value)
 
Is there a grouping involved? Or just one long list of records?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
This is a very small sample. The report is grouped by Attributes and I need to display the first and last record of each attribute according to date/time it is recorded.


ATTRIBUTE (1)
Measure1: 98.0 Date/Time: 9/24/200 13:46
Measure2: Recorded by: Test,Jan

Measure1: 97.0 Date/Time: 9/24/200 13:47
Measure2: Recorded by: Test,Jan

Measure1: 95.3 Date/Time: 9/24/2007 13:50
Measure2: Recorded by: Test,Jan

ATTRIBUTE (2)
Measure1: 28.0 Date/Time: 9/24/200 13:46
Measure2: Recorded by: Test,Jan

Measure1: 29.0 Date/Time: 9/24/2007 13:47
Measure2: Recorded by: Test,Jan

Measure1: 25.3 Date/Time: 9/24/2007 13:50
Measure2: Recorded by: Test,Jan

ATTRIBUTE (3)
Measure1: 128.0 Date/Time: 9/24/200 13:46
Measure2: 54.4 Recorded by: Test,Jan

Measure1: 129.0 Date/Time: 9/24/2007 13:47
Measure2: 80.2 Recorded by: Test,Jan

Measure1: 125.3 Date/Time: 9/24/2007 13:50
Measure2: 64.3 Recorded by: Test,Jan


The desired outcome is:

ATTRIBUTE (1)
Measure1: 98.0 Date/Time: 9/24/200 13:46
Measure2: Recorded by: Test,Jan

Measure1: 95.3 Date/Time: 9/24/2007 13:50
Measure2: Recorded by: Test,Jan

ATTRIBUTE (2)
Measure1: 28.0 Date/Time: 9/24/200 13:46
Measure2: Recorded by: Test,Jan

Measure1: 25.3 Date/Time: 9/24/2007 13:50
Measure2: Recorded by: Test,Jan

ATTRIBUTE (3)
Measure1: 128.0 Date/Time: 9/24/200 13:46
Measure2: 54.4 Recorded by: Test,Jan

Measure1: 125.3 Date/Time: 9/24/2007 13:50
Measure2: 64.3 Recorded by: Test,Jan

Thanks for looking at this.

Jan

 
OK, that doesn't look like a record. Do you have multiple detail lines? Or multiple groups?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
create a summary(maximum) and a summary(minimmum) for measure1
place those in the group footer
go to section expert and click on the formula button

(summary max formula created above) <>
measure 1
and
(summary min function created above) <>
measure 1)

I just did this on a report of mine that had hundreds per group and now each only have 2, the min and max
 
the above is assuming the report is grouped by attribute and measure 1 info and measure 2 info are in the detail section under tha grouping...

and to further clarify
section expert... select the details section and next to hide click the function button rpior to entering the formula explained....


good luck

 
i guess because i am new at this forum thing and I want to make sure I explained myself correctly, here is my exact example.

my report is grouped by the field {Call_Logging_Audit.Time_Call_Began} optioned by hour.
without suppression there are hundreds of records per hour

in the section expert hide formula I have the following:
Maximum ({Call_Logging_Audit.Time_Call_Began}, {Call_Logging_Audit.Time_Call_Began}, "by hour")
<> {Call_Logging_Audit.Time_Call_Began}
and
minimum ({Call_Logging_Audit.Time_Call_Began}, {Call_Logging_Audit.Time_Call_Began}, "by hour")
<> {Call_Logging_Audit.Time_Call_Began}

worked perfectly for what you are trying to do. that is if I understand correctly .....
 
First you should use a record selection formula like:

{pry8_flowsheet;1.report_section} = '100_phys_attributes'

...instead of using suppression. Then you can insert a group on attribute and then go to report->selection formula->GROUP and enter:

{table.date} = maximum({table.date},{table.attribute}) or
{table.date} = minimum({table.date},{table.attribute})

-LB


 
OK, I am going to try your suggestions now. Someone here thought they had come up with a different solution but that didn't work so I am back at it. Thanks so much for your time! Will let you know and give you some Stars if I can.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top