繁体   English   中英

SSRS传递报告参数

[英]SSRS passing Report Parameters

我正在努力解决这个问题的根本问题

我有一个用户输入信息的表单。 该信息通过URL传递给SSRS

我收到了错误

An error has occurred during report processing. (rsProcessingAborted)
Query execution failed for data set 'Report'. (rsErrorExecutingCommand)
Must declare the scalar variable "@ReportType". Must declare the scalar variable "@StoreNum". Must declare the scalar variable "@ReportType". Must declare the scalar variable "@StoreNum". 

查询是这样的

IF @ReportType = 'RE'
BEGIN
 exec  proc_Report_RETaxInvoices_InterActive @StoreNum, @StartDate, @EndDate, @TaxId, @BusinessName, @Attention, @LocatedIn, @Street, @AdditionalAddress, @City, @State, @PostalCode
END
ELSE IF @ReportType = 'RY'
BEGIN
 exec proc_Report_ARTaxInvoices_InterActive @StoreNum, @StartDate, @EndDate, @TaxId, @BusinessName, @Attention, @LocatedIn, @Street, @AdditionalAddress, @City, @State, @PostalCode
END

我的报告参数如下所示 在此输入图像描述 网址很长很讨厌,但看起来很有效

http://<SECRET>/ReportServer/Pages/ReportViewer.aspx?%2fSubway%2fAccounting%2fAccounting%2fTax+Report+Interactive&rs:Command=Render&rc:Parameters=false&ReportType=RE&StoreNum=25159&StartDate=11%2F1%2F2012&EndDate=11%2F1%2F2012&TaxId=1&BusinessName=1&Attention=1&LocatedIn=1&Street=1&AdditionalAddress=1&City=1&State=1&PostalCode=1

请注意

&ReportType=RE&StoreNum=25159

在查询字符串中

当我从SSRS BIDS环境中的查询编辑器运行报表时,将返回结果集。

所以我对这个错误感到茫然

检查您的“报告参数”是否已与数据集关联为“数据集参数”:

在此输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM