테이블 반환 매개 변수가 공백 레코드 집합을 반환하기 전이나 후에 하나 이상의 nullable 매개 변수를 추가해야하는 이유를 이해하는 데 어려움을 겪고 있습니다. http://geekswithblogs.net/GruffCode/archive/2012/06/21/using-table-valued-parameters-with-sql-server-reporting-services.aspx 다음SSRS가 테이블 반환 매개 변수가있는 데이터를 반환하지 않습니다.
내가 내 환경을 모방하기 위해 추가 매개 변수를 추가하고 내가 여기 @ ACCOUNTTYPE = 4
와 @ ACCOUNTTYPE = NULL을 대체하지 않는 한 나는 더 이상 기록을 얻을 수 없습니다
나는 성공적으로 여기에 예를 따라 데이터 세트의 코드입니다 :
exec(' declare @customerIdList Report.IntegerListTableType ' + @customerIdInserts +
' EXEC rpt_CustomerTransactionSummary
@startDate=''' + @startDate + ''',
@endDate=''' + @endDate + ''',
@customerIds = @customerIdList')
은이는 SQL 추적 (결과 : 빈 레코드)입니다
exec sp_executesql N'exec('' declare @customerIdList Report.IntegerListTableType '' + @customerIdInserts +
'' EXEC rpt_CustomerTransactionSummary
@startDate='''''' + @startDate + '''''',
@endDate='''''' + @endDate + '''''',
@accountType='''''' + @accountType + '''''',
@customerIds = @customerIdList'')',
N'@customerIdInserts nvarchar(40),
@startDate datetime,
@endDate datetime,
@accountType int',
@customerIdInserts=N'INSERT @customerIdList VALUES (304813)',
@startDate='2013-01-01 00:00:00',
@endDate='2014-12-31 00:00:00',
@accountType=NULL
내가 4로 NULL을 교체하고 내가 예상 결과를 얻을 SQL 관리 스튜디오에서 쿼리를 실행하는 경우 :
exec sp_executesql N'exec('' declare @customerIdList Report.IntegerListTableType '' + @customerIdInserts +
'' EXEC rpt_CustomerTransactionSummary
@startDate='''''' + @startDate + '''''',
@endDate='''''' + @endDate + '''''',
@accountType='''''' + @accountType + '''''',
@customerIds = @customerIdList'')',
N'@customerIdInserts nvarchar(40),
@startDate datetime,
@endDate datetime,
@accountType int',
@customerIdInserts=N'INSERT @customerIdList VALUES (304813)',
@startDate='2013-01-01 00:00:00',
@endDate='2014-12-31 00:00:00',
@accountType=4
사람이 올바른 방향으로 저를 설정하시기 바랍니다 수 있습니까?
감사
릭
와우에
에서 "텍스트"쿼리 유형
를 고정하여 문제를 해결! 그것은 실제로 효과가있다! – user4241675
이제 실제 시나리오에서 제로 (0)가 실제 값인 값을 가질 수 있는지 테스트해야합니다. 나는 계속 너를 게시 할 것이다. 그동안 대단히 감사합니다 – user4241675
전혀 probs 없습니다. –