Using Next() function in group

lunedì 19 marzo 2007 - 19.25

aleplgr Profilo | Junior Member

Hi, I have a table with 3 columns: ClientID, Date1 and Date2 and I need to calculate the difference: Date1 - Next(Date2) . The report is grouped by ClientID and I need to calculate this differences for each client.
The problem is that the Next() function just takes the Next record no matter if it is in the same group or not, how could I control that the Next() function selects the next in the SAME group?
Is there a way to notice that the record is the last of the group?

freeteo Profilo | Guru

hi,
i guess u should try to arrange a "Running Total Field" for the report, so u can decide when reset the sum etc...
They are very powerful, so try in that way...
ciao.

Matteo Raumer
[MCAD .net]
http://blogs.dotnethell.it/freeteo
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?

Dopo esserti registrato potrai chiedere
aiuto sul nostro Forum oppure aiutare gli altri

Consulta le Stanze disponibili.

Registrati ora !
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5