• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 922
  • Last Modified:

Microsoft RDLC report

Hi,

How do i make a sub total of a field for every group in table? example for data grouped by name, for every name i want to get the total number of days he is absent.

thanks.
0
jaxrpc
Asked:
jaxrpc
1 Solution
 
Sreedhar VengalaCommented:
Do you need SQL part to get the result set based on your condition
Sum(GroupBy(name),absentperiod);
do able with linq:
var orders =
        from o in OrderDetails
        group o by o.OrderID into oID
        select new {Category = oID.Key, TotalUnitsInStock = oID.Sum(o=>o.Quantity)};
        
orders.Dump();

SQL:

SELECT SUM(CONVERT(Int,[t0].[Quantity])) AS [TotalUnitsInStock], [t0].[OrderID] AS [Category]
FROM [Order Details] AS [t0]
GROUP BY [t0].[OrderID]

using OrderDetails table from Northwind

0
 
jaxrpcAuthor Commented:
Sorry. i think i did not explain clearly. I am talking about Table in the RDLC report not the database table.

Anyway for my problem, i have figured out the way to accomplish what i want. Just do a SUM(fields!yourField.Value) at the group footer of the RDLC report.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now