all groups > sql server reporting services > april 2005 >
You're in the

sql server reporting services

group:

How to Sum certain fields in a column


How to Sum certain fields in a column cynthia
4/8/2005 8:57:03 AM
sql server reporting services: Hi all,
I am new to reporting services. What I am trying to do is display some of
our accounting data in a debit and credit fields. I am using this expression
to display the correct data in the fields:
=Iif(Fields!credit.value,0,Fields!Amount.Value), however at the bottom I want
to sum only the information that was displayed. Does anyone know how to best
Re: How to Sum certain fields in a column Jens Süßmeyer
4/12/2005 12:00:00 AM
Hi there Cynthias,

good old days of access ;-)

AFAIK, -- > No there is no way to aggregate the report fields, you should do
this for best practice in your query, to minimize the rendering time, though
the Database Server (if you are using one) is in most cases the smartest
solution.

HTH, Jens Süßmeyer.


"cynthia" <cynthia@discussions.microsoft.com> schrieb im Newsbeitrag
news:BEA9F4E0-4BCC-40DA-AD06-13F7ECB2537A@microsoft.com...
[quoted text, click to view]

Re: How to Sum certain fields in a column Bruce L-C [MVP]
4/12/2005 4:15:22 PM
There is more than one way to do it.

One way that I think is particularly clean is to do the following. In your
field list (where you drag a field onto your form) do a right mouse click,
add field. The field can be a field that is not coming from the database but
is an expression. Put in the expression you have below and call it whatever
you want. This field is now indistinguishable from a field that came from
the database. You can sum, group, whatever you want on it.

The second way is to put in this:

=sum(iif(Fields!credit.value,0,Fields!Amount.Value)


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

AddThis Social Bookmark Button