Hi
I am having trouble with SSRS reports I have 2 date field parameters and when i run the report it ignores the 2 dates i input and displays all the records. I want it to only show me records where the sab_enddate is within 2 dates.
WHERE (ST.sab_shortcode LIKE 'SB%') AND (SP.sab_enddate BETWEEN @EndDateFrom AND @EndDateTo)
Dataset 1:
SELECT COUNT(*) AS ContactCount, ST.sab_shortcode AS ShortCode, C.sab_Address1_CountryIdName AS Country from Filteredsab_subscriptionplan SP INNER JOIN Filteredsab_subscriptiontype ST
ON SP.sab_subscriptiontypeid = ST.sab_subscriptiontypeid INNER JOIN FilteredContact C ON
C.ContactId = SP.sab_primarycontactid
WHERE ST.sab_shortcode like 'SB%'
GROUP BY C.sab_Address1_CountryIdName, ST.sab_shortcode
Dataset 2: (WHICH HAS THE PARAMETER)
SELECT SP.sab_name AS Subscription, SP.sab_startdate AS SDate, SP.sab_enddate AS EDate, ST.sab_name AS SubscriptionType, ST.sab_shortcode, C.fullname, C.sab_address1_countryidname
FROM Filteredsab_subscriptionplan AS SP INNER JOIN
Filteredsab_subscriptiontype AS ST ON SP.sab_subscriptiontypeid = ST.sab_subscriptiontypeid INNER JOIN
FilteredContact AS C ON C.contactid = SP.sab_primarycontactid
WHERE (ST.sab_shortcode LIKE 'SB%') AND (SP.sab_enddate BETWEEN @EndDateFrom AND @EndDateTo)
*This post is locked for comments