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

Best practice to dynamically add rows to the previous row value

Status
Not open for further replies.

Coyote2

MIS
May 25, 2010
41
US
Hi All...
my crystal report 10 needs to show cumulative number of tasks for 12 months period (generated dynamically based on today's date).

I already have the count of taskes for each month:
Month Period tasks
------------- ------
10/10 15
09/10 10
08/10 5
7/10 7

the cumulative results I need is this:

Month Period tasks
------------- ------
10/10 15
09/10 25 (10+15)
08/10 30 (5 + 25)
7/10 37 (7 + 30)

what is the best way of getting such calculations? my end result is crystal report not a web report.

Please keep i mind that the month period is dynamic depends on when to run the report.

thank you.
 
Markros,
here is my problem. the example you send me donen't quit fit my scenario as the data in my table (count) is a view with many joins to get the count so I can't write to running total to it just like the example is explaining.

to sum up again what I'm trying to do here is what I have:
1- a view that has project_no, month_date, count
2- created a table with these columns but no date.

trying to do the running total and update the table with the view data and running total..

not sure if that's the way to do it but the only one I can think of.

thank you.
 
mistery is solved. I'm using this method

select rank() OVER (ORDER BY a.au_lname, a.au_fname) as rank, a.au_lname, a.au_fname
from authors a
order by rank

done.

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top