SSRS passing Report Parameters
reporting-services, reportingservices-2005, sql-server
Solution
Check that your "report parameters" have been associated with your dataset as "dataset parameters":
Problem
I am having a difficult day trying to decode the underlying issue with this one I have a form that the user enters information. That information is passed through URL to SSRS I am getting the error ``` 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". ``` The query is this ``` 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 ``` My Report Parameters look like this The url is long and nasty but looks valid ``` 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 ``` Notice that ``` &ReportType=RE&StoreNum=25159 ``` is in the query string When I run the report from the query editor in the SSRS BIDS environment, a result set is returned. So I am at a loss for this error