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!

Select relevant instance in a multiple instance table 1

Status
Not open for further replies.

69AceCool

Technical User
May 13, 2005
28
GB
CRXI
ODBC connection to Remedy ARS 5.1
Table has multiple records per ID

Hi All,

This particular table has a Parent record (holds the final SLA measurements) and multiple child records (Which holds timing information as an incident passes from team to team). Each record has the same Incident ID {INC_ID}.
There is a SLA Field for Recovery {SLAR} eg. 240mins from start of incident to resolution) and an Activity Time field {AT} which records how much time a particular team has an incident for. (There are loads of other fields, just using relevant ones have also shortened the names) I have a running total on {AT} {#AT}. I want to highlight the first instance of the child records that exceeds the {SLAR}.

Please note I have the parent record in the main report grouped by INC ID linked to a subreport in the Group Footer. The link is on the {INC_ID}.

e.g {SLA} = 180 minutes

INC RecType Sequence Team AT #AT
716 Parent 0 TDS n/a n/a
716 Child 1 NS 40 40
716 Child 2 CS 127 167
716 Child 3 NS 15 182 <===
716 Child 4 TDS 9 191

As you can see the first instance is Sequence 3 above, I have a graphic (Small Red Diamond)that sits next to {#AT} with a suppression formula of "If {#AT} > {SLAR} then false else true". My problem here is the graphic shows for Sequence 3 & 4.

Any ideas would be greatly appreciated.

Cheers.
 
Change the suppression formula to:

whileprintingrecords;
numbervar cnt;

If {#AT} > {SLAR} then
cnt := cnt + 1;
if cnt = 1 then
false else true

-LB
 
Dammit, so simple...

LB, Works a treat as per usual!

Cheers mate!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top