Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
zhshqzyc
Posting Yak Master
240 Posts |
Posted - 2008-12-05 : 22:26:12
|
Hello,In my rdlc report there is a table from a stored procedure.Type Amount TotalCash 200 2000Cash 250 2000Cash 200 2000Cash 150 2000Cash 200 2000Cash 1000 2000 Credit 50 600Credit 150 600Credit 400 600 This table is designed silly because of the third column.To hide it, now I am going to diaplay the total values in another table.It should beType TotalCash 2000Credit 600 I guess the function of sum(Fields!xx.Value) may be used but I don't know it exactly.Would you please tell me a wise way?Thanks |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-05 : 23:44:29
|
add a grouping to the table based on field =Fields!Type.value and use two columns with values asType(table Col1) Total( table Col2)=Fields!Type.value SUM(Fields!Amount.value) |
 |
|
zhshqzyc
Posting Yak Master
240 Posts |
Posted - 2008-12-08 : 09:29:16
|
Well, what I got isCash 2000Cash 2000Cash 2000Cash 2000Cash 2000Cash 2000 They are duplicated. I only want to show one row. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-08 : 09:43:06
|
quote: Originally posted by zhshqzyc Well, what I got isCash 2000Cash 2000Cash 2000Cash 2000Cash 2000Cash 2000 They are duplicated. I only want to show one row.
have you applied grouping as i suggested? |
 |
|
zhshqzyc
Posting Yak Master
240 Posts |
Posted - 2008-12-08 : 10:37:26
|
Okay.I added.May I get the rows count? |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-09 : 03:18:13
|
quote: Originally posted by zhshqzyc Okay.I added.May I get the rows count?
use countrows() function. add scope parameter to dataset or group name based on whih count you want. |
 |
|
|
|
|