Display count of column for specific value in RDLC report using C# and VB.Net in ASP.Net

Vanessa
 
on Sep 30, 2021 11:26 PM
635 Views

Hello!

I have a follow query bout my previous question which was anwered but I have another problem to solve. That link below was my query before.

Display count of column specific value in RDLC report using C# and VB.Net in ASP.Net

The IT and HR are under the Column Department, their salary is on Salary Column and I want to dispaly their salary total only not included Supply data in total. In other words, I have a Department and Salary Column on my table and what I need on is the total Salary of IT and HR under Department Column.

Sample Report Output

Dapartment              Salary

IT                            5,000

HR                           3,000

Supply                      2,000

Salary Total               8,000 because I dont want to add Supply

                                Salary on Salary Total 

Download FREE API for Word, Excel and PDF in ASP.Net: Download
dharmendr
 
on Oct 02, 2021 06:52 AM

Instead of displaying through expression using parameter and set the value from code.

Refer below links.

Show (Display) column sum and calculated field in RDLC report in ASP.Net

Show sum of columns in RDLC Report using C# and VB.Net in ASP.Net

Vanessa
 
on Oct 03, 2021 10:45 AM

I got the correct syntax on your source code given to me

=Sum
(
    Switch
    (
         Fields!Department.Value = "HR", VAL(Fields!Supply.Value), 
         Fields!Department.Value = "IT", VAL(Fields!Supply.Value) 
    )
)