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

Adding summary to a running total 1

Status
Not open for further replies.

lhelmeratwwp

Technical User
Sep 27, 2010
2
CA
Hello,

I'm struggling to understand how to roll up the results of a group into a lower group. Here's an example of what I'm trying to accomplish... Every fifteen minutes I look at the number of "PASSED" results and if greater than 10 the 15 minute summary would be PASSED. Then at the end of the hour if three of the four 15 minute summaries PASSED the hour would be flagged as passed otherwise the hour would be flagged as FAILED.

I have tried using a running total and that works at the detail level, however I cannot figure out how to do it on the GF1 Level. If it all worked the way I'm thinking I would expect that with three 15 minute summaries PASSED and one 15 minute summary failed the GF1 running total would be 3.

Can someone point me in the right direction?

Thanks,
Lou



D 1/1/2011 9:00 AM PASSED 1
D 1/1/2011 9:01 AM PASSED 2
D 1/1/2011 9:02 AM PASSED 3
D 1/1/2011 9:03 AM PASSED 4
D 1/1/2011 9:04 AM PASSED 5
D 1/1/2011 9:05 AM PASSED 6
D 1/1/2011 9:06 AM FAILED 6
D 1/1/2011 9:07 AM FAILED 6
D 1/1/2011 9:08 AM FAILED 6
D 1/1/2011 9:09 AM FAILED 6
D 1/1/2011 9:10 AM FAILED 6
D 1/1/2011 9:11 AM FAILED 6
D 1/1/2011 9:12 AM FAILED 6
D 1/1/2011 9:13 AM FAILED 6
D 1/1/2011 9:14 AM FAILED 6
D 1/1/2011 9:15 AM FAILED 6
GF2 1/1/2011 9:15 AM FAILED 6
D 1/1/2011 9:16 AM PASSED
D 1/1/2011 9:17 AM PASSED
D 1/1/2011 9:18 AM PASSED
D 1/1/2011 9:19 AM PASSED
D 1/1/2011 9:20 AM PASSED
D 1/1/2011 9:21 AM PASSED
D 1/1/2011 9:22 AM PASSED
D 1/1/2011 9:23 AM PASSED
D 1/1/2011 9:24 AM PASSED
D 1/1/2011 9:25 AM PASSED
D 1/1/2011 9:26 AM FAILED
D 1/1/2011 9:27 AM FAILED
D 1/1/2011 9:28 AM FAILED
D 1/1/2011 9:29 AM FAILED
D 1/1/2011 9:30 AM FAILED
GF2 1/1/2011 9:30 AM PASSED
...
GF1 1/1/2011 9:00 AM PASSED
 
Create a formula like this for the detail section:

//{@Passdet}:
if {table.status } = "PASSED" then 1

Create a second formula:

//{@15minpass} to be placed in the group#2 header or footer:
whileprintingrecords;
numbervar min15;
stringvar minstat;
if sum({@Passdet},{table.group2field}) > 10 then (
min15 := min15 + 1;
minstat := "PASSED"
) else
minstat := "FAILED";

//{@Hrpass} to be placed in the Group #1 Footer:
whileprintingrecords;
numbervar min15;
stringvar hrstat;
if min15 >= 3 then
hrstat := "PASSED" else
hrstat := "FAILED"

-LB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top