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

Running totals vs NEXT Function 1

Status
Not open for further replies.

5lights

MIS
Nov 19, 2003
53
US
In a sub-report, I have one field running total working & eliminating duplicates using a Next statement, but now I need another field counted...but its not sorted in order like the first. The data duplicates in this field every 2nd or 3rd record........How can I get a check of the 2nd or third records?
 
It sounds like you can just do a distinct count on that record either in a running total or in a summary depending on how you need to present the value.

~Brian
 
It would help if you provided the details of how you have the running total set up (Sum or count of what? Is there an evaluation formula? Reset on change of what?) and also show a sample of data so we can see how the values are repeating.

-LB
 
To simplify a bit, it may work to place this in the subreport using select Insert->Field Object->Right click Running Totals and select DistinctCount of the field.

You can also right click any field and select insert->grand total->distinct count

This value will be available anywhere within the report, even before the detail section.

-k
 
Dataset per CustomerID looks like this:

Process1 Event Process2
Start EndDates Start End Start End
**************** ************ ***********
A B X X Y
A B X Y Z
C D X X Y
C D X Y Z
E F X X Y
E F X Y Z
*************** ************ ***********
(DistinctCount)3 (DistinctCount)1 (DistinctCount)2

Need: Total EVENTs during PROCESS1 (ie 0 Events in Process1)
Total EVENTs during PROCESS2 (ie 1 Event in Process2)
But duplicated 3 times
Recommendations?
 
I think you could set this up using the running total editor like: Select {Event.Start}, distinctcount, evaluate based on a formula:

{Event.Start} in {Process1.Start} to {Process1.End}//assuming your letters represent different values of date fields

Reset on change of {table.customerID}.

For the Process2 running total, change the formula to:

{Event.Start} in {Process2.Start} to {Process2.End}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top