Hello
I need help.
I have a report that displays Column "FullName" And Column "Antal" (quantity).
This is my query for that.
SELECT CONCAT(u.FirstName, ' ', u.LastName) AS FullName, COUNT(*) AS Antal
FROM Bookings b
INNER JOIN Users u ON u.Id = b.BookedById
INNER JOIN CompanyUsers cu ON (cu.Id = u.Id)
WHERE cu.CompanyId = 2
GROUP BY u.Id
ORDER BY Antal DESC;
I have added two parameter values from the ReportParameter-collection of the report, one for Year and one for Month. These values displays in two dropdowns. I have also added a filter. =Fields.Year = =Parameters.Year AND =Fields.Month = =Parameters.Month
This is my query for that.
SELECT DISTINCT MONTH(BookedDate) AS Month, YEAR(BookedDate) AS Year
FROM Bookings b
INNER JOIN CompanyUsers cu ON cu.Id = b.BookedById
ORDER BY Year DESC, Month DESC;
The textboxes that displays FullName and Antal is empty when I choose a value from the "dropdowns". But if I remove the filter FullName an Antal displays with the overall quantity.
How can I get my Report to interact with the parameters value in my dropdowns. When I choose a month from the dropdown I want the quantity for exactly that month. Not the overall result.
Excuse my English
Thanks
/Emil