Last post May 09, 2012 09:16 AM by ylsv
May 09, 2012 09:16 AM|ylsv|LINK
I am new to SSRS reports. I need to create a report that gives a difference of drivers from last month to this month. The report should look something like this. Any help on this greatly appreciated.
Location1 Location2 Location3 Totals
Total as of 04/09/2012 124 117 94 335
Driver Category Contractor 120 110 90 320
SubContractor 2 5 7 14
-2 -2 +3 +9
Total as of 05/09/2012 122 115 97 344
I could get everything in this report except the Difference of these totals. How do I really do that. How do I really access the values from these two datasets and find out the difference?
I have created two different data sets with the following queries.
(CASE WHEN SubContractor = 1 THEN 0 ELSE 1 END) ContractorNumber
,Contractor.LocationID AS [Contractor LocationID]
(CASE WHEN SubContractor = 1 THEN 1 ELSE 0 END) AS SubContractor
INNER JOIN Location
ON Contractor.LocationID = Location.LocationID
INNER JOIN Ethnicity
ON Contractor.EthnicityID = Ethnicity.EthnicityID
Contractor.ContractTerminationDate is null AND ContractVersionDate <= GetDate()
order by Location.Location
Contractor.ContractTerminationDate is null AND (ContractVersionDate <= @SnapShotDate)
order by Location.Location.