У меня есть 4 параметра в моем SSRS, данные повторного воспроизведения собираются с помощью SP
ALTER PROCEDURE [adjuster].[rpt_HIIGAdjusterLicense]
@Adjustername varchar (max),
@State char (3),
@LicenseStatus char (3),
@RenewalNotAllowed varchar (5)
AS BEGIN(
SELECT
FirstName +' '+ LastName as AdjusterName ,
StateLicense,
LicenseNumber,
LicenseStatus,
ExpirationDate,
RenewalNotAllowed,
NPN
FROM adjuster.vw_HIIGAdjusterLicense
Where ( FirstName LIKE (CASE WHEN @Adjustername IS NULL THEN FirstName ELSE @Adjustername + '%' END))
OR (@State = 'ALL' OR @State IN (SELECT Value FROM dbo.FnSplit(@State, ',')))
OR ( @LicenseStatus = 'ALL' OR @LicenseStatus IN (SELECT Value FROM dbo.FnSplit(@LicenseStatus, ',')))
AND (@RenewalNotAllowed = 'ALL' OR @RenewalNotAllowed IN (SELECT Value FROM dbo.FnSplit(@RenewalNotAllowed, ',')))
)
END
GO
, а наборы данных параметров -
SELECT DISTINCT 2 AS Priority, LicenseStatus
FROM vw_License
UNION ALL
SELECT 1 AS Priority, 'ALL' AS Choice
ORDER BY Priority, LicenseStatus
SELECT DISTINCT 2 AS Priority, StateLicense
FROM vw_License
UNION ALL
SELECT 1 AS Priority, 'ALL' AS Choice
ORDER BY Priority, StateLicense
SELECT DISTINCT 2 AS Priority, RenewalNotAllowed
FROM LicenseDetail
UNION ALL
SELECT 1 AS Priority, 'ALL' AS Choice
ORDER BY Priority, RenewalNotAllowed
Когда в SSRS, когда значение имени имеет нулевое состояние значение - «ВСЕ», значение статуса - «Все», а значение RenewalNotAllowed - «N». В отчете по-прежнему отображаются записи, для которых значение Y равно RenewalNotAllowed.
, но должны отображаться записи со значением «N» для RenewalNotAllowed. см. рисунок ниже