November 22, 2013 at 2:51 pm
I am trying to create a report to generate W2 records for multiple employees. I have 5 datasets in the report. One that generates the gross wages for the employees, and one each to generate the Medicare, Social Security, Fed, and State taxes.
The query (I am using in the data source (W2) is:
Select EmployeeName, SSN, sum(Grossamount) as "Gross Wages"
From CheckRegister CR inner join
Payee P on CR.PayeeID = P.PayeeID
Where YEAR(checkdate) = @W2Year
Group By cr.payeeid, EmployeeName, SSN
For the field on the W2 form, I have created the expression:
=Sum(Fields!Gross_Wages.Value, "W2")
The expression for displaying the SSN is:
=Left(First(Fields!SSN.Value, "W2"), 3) + "-" + Mid(First(Fields!SSN.Value, "W2"), 4,2) + "-" + Right(First(Fields!SSN.Value, "W2"), 4)
When I have tested the query in Sql Server, it returns all of the employees and sums the gross wages by employee. However, in SSRS, it is summing up all the gross wages for all of the employees. The report only displays the first SSN it finds, but sums all the wages and assigns it to this first SSN.
Not sure what I am doing wrong here. Any help appreciated !
November 26, 2013 at 9:28 am
Could you please include a screenshot of your report design as I think you may not have grouped the report correctly.
Fitz
November 26, 2013 at 10:27 am
Was able to get what I needed by making it a subreport using the new report wizard.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply