March 7, 2013 at 7:19 am
Below is my Dataset, what I would like to be able to do is only have a parameter showing if certain criteria is met can you help:
This is my process:
When the report is run the user is faced with one parameter, this is the Reporting Level Parameter this is not a multi value choice this a either/or option.
The choice is either/or ‘Company or BDM or Region or Site’
Once this is selected depending on choice the following parameters will unhide:
Company Time Date Report Type
BDM BDM Distinct List (This can be Multivalued) Time (This can be Multivalued) Date (This can be Multivalued) Report Type (Either/Or)
Region Region Distinct List (This can be Multivalued) Time (This can be Multivalued) Date (This can be Multivalued) Report Type (Either/Or)
Site Site Distinct List (This can be Multivalued) Time (This can be Multivalued) Date (This can be Multivalued) Report Type (Either/Or)
SELECT OccupancyDetail.CalendarYear, OccupancyDetail.CalendarMonth, SUM(OccupancyDetail.No_of_Nights) AS No_of_Nights,
SUM(OccupancyDetail.Capacity) AS Capacity
FROM OccupancyDetail INNER JOIN
Site ON OccupancyDetail.Site_Skey = Site.Site_Skey
WHERE (OccupancyDetail.ReferenceDate = convert(Date,getdate()))
AND CASE WHEN @Time = 'YEAR' THEN CAST(CalendarYear as varchar(4))
else CalendarMonth + ' ' + CAST(CalendarYear as varchar(4)) end in (@Dates)
AND BDM IN (@BDM)
AND Region IN (@Region)
AND SiteName IN (@SiteName)
GROUP BY OccupancyDetail.ReferenceDate, OccupancyDetail.CalendarYear, OccupancyDetail.CalendarMonth
Thanks
Wayne
Viewing 0 posts
You must be logged in to reply to this topic. Login to reply