My apologies for the title, it was a hard one to summarize.
I am using CR 2008.
Here is an example of my data and what I am trying to accomplish.
({table.Weight}, {table.Time}, {table.X}, {table.Y}, {table.TimeDiff})
(100, 0 , A , 1 , 8)
(100, 25 , A , 2, 8)
(200 , 92 , B , 1, 8)
(150, 125 , B , 2, 8)
(180, 30 , B , 3, 8)
(200, 100 , B , 4, 8)
(50, 192 , B , 5, 8)
{table.TimeDiff} = 8 (the TimeDiff is set by the user)
I need to determine the maximum weight (sum if more than one record) for any record(s) that have a timing difference of {table.TimeDiff} or less.
Then I need to display the X and Y for the record(s).
I have created a formula,
//@Label
{table.X} + ToText({table.Y},0)
to use to display the results.
The report will need to look at each record, determine which ones are within the TimeDiff value, total the Weights for the results and display the @Label(s) with the maximum combined Weight.
The results from the above data should be; B1, B4
A2 and B3 meet the {table.TimeDiff} requirement but the sum of their weight is less than B1, B4.
There will be data sets where the TimeDiff is not met and a single record will be the result. The result should be @Label with the Max ({table.Weight}). If there is no Max({table.Weight}) the result should be FirstRecord({@Label}).
Thanks in advance for any assistance. The help is appreciated.
I am using CR 2008.
Here is an example of my data and what I am trying to accomplish.
({table.Weight}, {table.Time}, {table.X}, {table.Y}, {table.TimeDiff})
(100, 0 , A , 1 , 8)
(100, 25 , A , 2, 8)
(200 , 92 , B , 1, 8)
(150, 125 , B , 2, 8)
(180, 30 , B , 3, 8)
(200, 100 , B , 4, 8)
(50, 192 , B , 5, 8)
{table.TimeDiff} = 8 (the TimeDiff is set by the user)
I need to determine the maximum weight (sum if more than one record) for any record(s) that have a timing difference of {table.TimeDiff} or less.
Then I need to display the X and Y for the record(s).
I have created a formula,
//@Label
{table.X} + ToText({table.Y},0)
to use to display the results.
The report will need to look at each record, determine which ones are within the TimeDiff value, total the Weights for the results and display the @Label(s) with the maximum combined Weight.
The results from the above data should be; B1, B4
A2 and B3 meet the {table.TimeDiff} requirement but the sum of their weight is less than B1, B4.
There will be data sets where the TimeDiff is not met and a single record will be the result. The result should be @Label with the Max ({table.Weight}). If there is no Max({table.Weight}) the result should be FirstRecord({@Label}).
Thanks in advance for any assistance. The help is appreciated.