Showing posts with label scope. Show all posts
Showing posts with label scope. Show all posts

Monday, March 26, 2012

Question regarding calculated fields in reporting services 2005

Is there a concept of scope for calculated fields? I tried the
following and VS crashed.
=IIf(RowNumber("GroupName") = 1, MyValue, 0)
Example of what I am trying to accomplish.
GroupID, MyValue
1, 5
1, 5
1, 5
2, 10
3, 20
3, 20
========== Average MyValue should be (5 + 10 + 20)/3...not (5+5+5+10+20+20)/5.
MyValue would be the same for each GroupID. Does this make sense?Hi,
Infact you can use "Avg()" itself it has a scope parameter.
Amarnath
"Nergock@.gmail.com" wrote:
> Is there a concept of scope for calculated fields? I tried the
> following and VS crashed.
> =IIf(RowNumber("GroupName") = 1, MyValue, 0)
> Example of what I am trying to accomplish.
> GroupID, MyValue
> 1, 5
> 1, 5
> 1, 5
> 2, 10
> 3, 20
> 3, 20
> ==========> Average MyValue should be (5 + 10 + 20)/3...not (5+5+5+10+20+20)/5.
> MyValue would be the same for each GroupID. Does this make sense?
>

Friday, March 23, 2012

Question On Stored Procedures

Hello and thank you for taking the time to read this message.I realize this maybe a little out of scope but I was just wondering if anybody had some suggestions about the best way to learn how to write stored procedures in sql sever. I've written some very simple ones, but the more research I do, the more I realize I don't know. I have learned some things by just getting into the ASP books but these really don't fully "tackle" the subject per say. If anybody has any suggestions as to a method or a book, it would be greatly appreciated.
Best Regards,
JasonCheck out this highly recommended book:
Rob Veiera's Professional SQL Server 2000 Programming
You might also consider Ken Henderson'sThe Guru's Guide to SQL Server Stored Procedures, XML, and HTML.

sql