Search code examples
sqlssrs-2008ssrs-2012

Need to Display records Group By in SSRS


In SSRS 2008, I am developing the report that should display the records based on condition: It should give me the amt_total based on gift_type (Here, amt_total and gift_type are columns of the table). This is the query I am using.

SELECT   o110113.gift_batch_no, 
     o110113.gift_type, 
     (o110113.gift_date),
     o110113.feed_doc_code, 
SUM (o110113.amt_total)
FROM GIFT_CARD o110113
   WHERE (o110113.gift_type IN
             ('RR', 'RB', 'CR', 'RM', 'RW', 'CW', 'RJ', 'RO', 'RK', 'CI')
     )
GROUP BY o110113.gift_batch_no,
     o110113.gift_type,
     (o110113.gift_date),
     o110113.feed_doc_code
ORDER BY o110113.gift_batch_no ASC, o110113.gift_type ASC

And the report I am trying to generate in SSRS 2008 should look like this.

Clikck this to see the Image of the Report that I am trying to develop

I am trying to use the SSRS expression

 =Sum(Fields!SUM_O110113_AMT_TOTAL_.Value,"GIFT_TYPE")

It is throwing me the error saying:

Please click this to see an Error I am getting in SSRS

Kindly provide the Solution

This the report design I have developed

[click to see the Image of report]

Thanks Arun


Solution

  • Here you need to do group by of your Tablix. First you need to add Row group on gift_batch_no so that will dispaly based on gift batches. Another row group your have to create on Gift type and in that second group type you need to set SUM of total amount it will work.

    Let me know if you have any other query