SSRS에서 보고서를 필터링하기 위해 검색 매개 변수가 필요한 보고서를 작성하고 있습니다. 이 매개 변수는 보고서가 정상적으로 실행되도록하는 null 허용 기본값으로 설정됩니다.SSRS IIF 매개 변수가 NULL과 같음 정상적으로 보고서를 실행합니다.
보고서가 실행되지만 검색 매개 변수에 광고를 보내기 전까지는 아무 것도 반환되지 않습니다.
IIF 표현식을 사용하여 매개 변수가 null 인 경우 보고서가 정상적으로 실행된다고 말할 수 있습니까?
다음은 SSRS 내에서 데이터 집합을 생성하는 데 사용하는 쿼리입니다.
CREATE TABLE #StartDateTable(
stSecurityType varchar(10) NOT NULL,
stSecuritySymbol varchar(50) NOT NULL,
stPrice float NOT NULL,
stSecurityID int NOT NULL,
stPriceDate date NOT NULL
)
INSERT INTO #StartDateTable (stSecurityType, stSecuritySymbol, stPrice, stSecurityID, stPriceDate)
SELECT DISTINCT
Instruments.SecurityType, Instruments.SecuritySymbol,
InstrumentPrice.Price, InstrumentPrice.SecurityID, InstrumentPrice.PriceDate
FROM
InstrumentPrice
JOIN
Instruments ON Instruments.ID = InstrumentPrice.SecurityID
WHERE
InstrumentPrice.PriceDate = @StartDate;
CREATE TABLE #EndDateTable
(
etSecurityType varchar(10) NOT NULL,
etSecuritySymbol varchar(50) NOT NULL,
etPrice float NOT NULL,
etSecurityID int NOT NULL,
etPriceDate date NOT NULL
)
INSERT INTO #EndDateTable (etSecurityType, etSecuritySymbol, etPrice, etSecurityID, etPriceDate)
SELECT DISTINCT
Instruments.SecurityType, Instruments.SecuritySymbol,
InstrumentPrice.Price, InstrumentPrice.SecurityID,
InstrumentPrice.PriceDate
FROM
InstrumentPrice
JOIN
Instruments ON Instruments.ID = InstrumentPrice.SecurityID
WHERE
InstrumentPrice.PriceDate = @EndDate;
SELECT *
FROM #StartDateTable
LEFT JOIN #EndDateTable ON #EndDateTable.etSecurityID = #StartDateTable.stSecurityID
I 설정처럼 함께 SSRS 내에서 데이터 세트에 대한 필터로 검색 매개 변수는 나는 그것이 와일드 카드로 원하는대로.
안녕 t_m. 답장을 보내 주셔서 감사합니다. 나는 둘 다 시도했거나 IIF 표현식 중 어느 것도 작동하지 않는 게시판을 가지고있다. – user3930058
예제 테이블 구조와 샘플 데이터를 게시 할 수 있습니까? – Tak