HI,
We are using RunningValue function to alternate color for displaying rows.
Here is the property value for backgrond color:
=iif(RunningValue(Fields!Row_Date.Value, CountDistinct,Nothing) Mod 2,
"white", "#E4E7E6")
We are having a problem with using that and a drill down at the same time.
The first drill down works fine, but the second does not. Any thoughts?
MichaelI am in the middle of installing the gold bits, so I don';t have books on
line, but we use the rownumber function instead of runningvalue... See if
that works for you.
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"Michael" wrote:
> HI,
> We are using RunningValue function to alternate color for displaying rows.
> Here is the property value for backgrond color:
> =iif(RunningValue(Fields!Row_Date.Value, CountDistinct,Nothing) Mod 2,
> "white", "#E4E7E6")
> We are having a problem with using that and a drill down at the same time.
> The first drill down works fine, but the second does not. Any thoughts?
> Michaelsql
Showing posts with label property. Show all posts
Showing posts with label property. Show all posts
Wednesday, March 28, 2012
Friday, March 23, 2012
Running sum?
Is there running sum function in MS SQL Server 2000 like a property in MS
Access?
In advance thank you,
Stanko Milosev
work:
stanko@.nospam--netcomp.co.yu
www.netcomp.co.yu
home:
stanko@.nospam.milosev.co.yu
www.milosev.co.yuStanko Milosev,
> Is there running sum function in MS SQL Server 2000 like a property in MS
> Access?
No, there is not such function in SQL Server, but you can calculate it.
Example:
use northwind
go
create table t1 (
c1 int not null identity unique,
c2 numeric(9, 2)
)
go
insert into t1(c2) values(193.51)
insert into t1(c2) values(194.5)
insert into t1(c2) values(202.71)
insert into t1(c2) values(192.79)
insert into t1(c2) values(197.6)
insert into t1(c2) values(192.9)
insert into t1(c2) values(192.76)
insert into t1(c2) values(191.91)
insert into t1(c2) values(187.9)
go
select
a.c1,
a.c2,
sum(b.c2) as running_sum_c2
from
t1 as a
left join
t1 as b
on a.c1 >= b.c1
group by a.c1, a.c2
order by a.c1
go
drop table t1
go
AMB
"Stanko Milosev" wrote:
> Is there running sum function in MS SQL Server 2000 like a property in MS
> Access?
> In advance thank you,
> Stanko Milosev
> work:
> stanko@.nospam--netcomp.co.yu
> www.netcomp.co.yu
> home:
> stanko@.nospam.milosev.co.yu
> www.milosev.co.yu
>
>|||I think that the running sum is a function of Access, not the Jet database.
Alejandro gave you a working solution.
You can test it out but you should also test doing the calculations client
side.
You may find (I'm tempted to say "probably") that it will perform better
doing it client side.
"Stanko Milosev" <stanko@.nothing.com> wrote in message
news:Ou7qBQH4FHA.2676@.TK2MSFTNGP15.phx.gbl...
> Is there running sum function in MS SQL Server 2000 like a property in MS
> Access?
> In advance thank you,
> Stanko Milosev
> work:
> stanko@.nospam--netcomp.co.yu
> www.netcomp.co.yu
> home:
> stanko@.nospam.milosev.co.yu
> www.milosev.co.yu
>|||Thank you all, we solve the problem,
Stanko.
"Stanko Milosev" <stanko@.nothing.com> wrote in message
news:Ou7qBQH4FHA.2676@.TK2MSFTNGP15.phx.gbl...
> Is there running sum function in MS SQL Server 2000 like a property in MS
> Access?
> In advance thank you,
> Stanko Milosev
> work:
> stanko@.nospam--netcomp.co.yu
> www.netcomp.co.yu
> home:
> stanko@.nospam.milosev.co.yu
> www.milosev.co.yu
>
Access?
In advance thank you,
Stanko Milosev
work:
stanko@.nospam--netcomp.co.yu
www.netcomp.co.yu
home:
stanko@.nospam.milosev.co.yu
www.milosev.co.yuStanko Milosev,
> Is there running sum function in MS SQL Server 2000 like a property in MS
> Access?
No, there is not such function in SQL Server, but you can calculate it.
Example:
use northwind
go
create table t1 (
c1 int not null identity unique,
c2 numeric(9, 2)
)
go
insert into t1(c2) values(193.51)
insert into t1(c2) values(194.5)
insert into t1(c2) values(202.71)
insert into t1(c2) values(192.79)
insert into t1(c2) values(197.6)
insert into t1(c2) values(192.9)
insert into t1(c2) values(192.76)
insert into t1(c2) values(191.91)
insert into t1(c2) values(187.9)
go
select
a.c1,
a.c2,
sum(b.c2) as running_sum_c2
from
t1 as a
left join
t1 as b
on a.c1 >= b.c1
group by a.c1, a.c2
order by a.c1
go
drop table t1
go
AMB
"Stanko Milosev" wrote:
> Is there running sum function in MS SQL Server 2000 like a property in MS
> Access?
> In advance thank you,
> Stanko Milosev
> work:
> stanko@.nospam--netcomp.co.yu
> www.netcomp.co.yu
> home:
> stanko@.nospam.milosev.co.yu
> www.milosev.co.yu
>
>|||I think that the running sum is a function of Access, not the Jet database.
Alejandro gave you a working solution.
You can test it out but you should also test doing the calculations client
side.
You may find (I'm tempted to say "probably") that it will perform better
doing it client side.
"Stanko Milosev" <stanko@.nothing.com> wrote in message
news:Ou7qBQH4FHA.2676@.TK2MSFTNGP15.phx.gbl...
> Is there running sum function in MS SQL Server 2000 like a property in MS
> Access?
> In advance thank you,
> Stanko Milosev
> work:
> stanko@.nospam--netcomp.co.yu
> www.netcomp.co.yu
> home:
> stanko@.nospam.milosev.co.yu
> www.milosev.co.yu
>|||Thank you all, we solve the problem,
Stanko.
"Stanko Milosev" <stanko@.nothing.com> wrote in message
news:Ou7qBQH4FHA.2676@.TK2MSFTNGP15.phx.gbl...
> Is there running sum function in MS SQL Server 2000 like a property in MS
> Access?
> In advance thank you,
> Stanko Milosev
> work:
> stanko@.nospam--netcomp.co.yu
> www.netcomp.co.yu
> home:
> stanko@.nospam.milosev.co.yu
> www.milosev.co.yu
>
Subscribe to:
Posts (Atom)