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

Not sure what method to use, OnRow, OnRead, Fetch()

Status
Not open for further replies.

furrelkt

Programmer
Jul 5, 2005
17
US

I have a report that i need to calculate the days reguardless of instances. The out put now is this...

Date TASK Hours Days
2005-01-01 this task 8 1
2005-01-02 this task 8 1
2005-01-02 different 2 1
2005-01-03 same 4 1




This is the format, but.... I do not want to display '1' day when there two instances on the same day. I would want them to be together, but still show the instance seperately. Although there is 2 tasks on the same date and they are different tasks, it should be rolled up into 'one' day not a total of two days.




I hope this is understandable. I was thinking about using the OnRow() of the content frame and using some VB to get the value but i honestly dont know how to do this. Please if anyone can give me some ideas. The report results would look like this...




Date TASK Hours Days
2005-01-01 this task 8 1
2005-01-02 this task 8 0
2005-01-02 different 2 1
2005-01-03 same 4 1


The date 2005-01-02 has two 'different' tasks but should be counted as only '1' day not two.



I have been doing some searching on the site, I see there is the Fetch method that checks the previous and current row. I am not sure how to assign the value '1' or '0' to the row if the previous row has some of the same values based on whether the fullname and the date match or repeat.



I know what i want to say but dont know how to put it into code...



Basically,



If these conditions (full_name and Date and project) are the same in the previous row then make days = 0 but if those three exactly are not the same then want to display a '1' in the row.



I just am really having trouble doing the code or where to put it. I think in the fetch. Any help would really be appreciated.



Keri



Actuate eRDPro
7 SP 2
SQL Server
[Niku] Clarity



"I can accept failure, but I can't accept not trying." - Michael Jordan



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top