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!

Crosstab - Alarms By Hour By Day - Want ot highlight Top 10

Status
Not open for further replies.

dacards

Technical User
Apr 11, 2006
26
US
Using CR2008

I've got a cross tab that seperates data by the Day of Week and also by Hour Of Day. And it's showing volume of alarms. End product looks like

12AM 1AM 2AM 3AM ........10PM 11PM
MONDAY 23 45 24 255 ........ 54 43
TUESDAY 44 22 23 342 ........ 23 42
WEDNESDAY 20 54 19 233 ........ 40 96

With 7 Days per week and 24 hours per day, my cross tab has 168 cells. I'd like to highlight/color the TOP 10 cells. I've tried to solve and searched for a solution but no luck. The closest i could get was to determine the Avg/Hour and then edit the field to color it based on fields that are 2X the average.

Any help is appreciated.
 
IF in the main report you insert a group based on a formula like this:

dayofweek({table.datetime})&" "& hour({table.datetime})

Then insert a count to show volume at this group level, you can do a group sort->topN = 10. Then create a formula like this for the main report->group section:

whileprintingrecords;
stringvar x;
x := x + totext(count({table.alarm},{@dayandtime}),"00000") + ",";

Then in the crosstab (in the report footer), select an inner cell->format field->border->color->background->x+2 and enter:

whileprintingrecords;
stringvar x;
if totext(currentfieldvalue,"00000") in x then
cryellow else
crnocolor

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top