Counter column

martedì 06 febbraio 2007 - 17.52

aleplgr Profilo | Junior Member

Hi! I'm trying to calculate a new field in my report, this field must count the number of times a client bought something, it should look like this:
Id Date item counter
1 x a 1
1 y c 2
1 z b 3
2 x b 1
2 y a 2

Id is the identification of the client
Date is the date the client bought some item(a,b,c,..)
I have this columns and I need to calculate the counter column

The counter should count the number of different Dates for the same Id client, I think this can be done using a Formula but can't do it

freeteo Profilo | Guru

hi,
try to look at "running total fields". This kind of field, is a special field born to make summary, average etc...calculation, without folowing the normal flow of the records in the report.
So i guess it's the right way for u, make a summary with a "Running Total Field" where u can also specify the condition when restart and other nice stuff...
ciao.

Matteo Raumer
[MCAD .net]
http://blogs.dotnethell.it/freeteo

aleplgr Profilo | Junior Member

Thanks!!! I was trying to do it manually using some for loops and variables, I think that Running Totals are much better, CR does it for me!!
But I still don't know in a Formula how to capture in a variable the record actually read and compare it with the last one read... Well now I don't know if that would be useful anyway, may be it's not necessary

freeteo Profilo | Guru

ok,
if u solve ur problem accept an answer to close the thread.
If u still got new questions, open a new Thread.Thanks!
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