Quantcast
Channel: SQL Server Reporting Services
Viewing all articles
Browse latest Browse all 1418

Passing Parameters to a Local Report (.rdlc)

$
0
0

I'm having a heck of a time figuring this out. I have a local report in my Website that I need to pass 4 control parameters to. Here is the ReportViewer code.

<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"
     Height="700px" Width="100%">
     <LocalReport ReportPath="reports\Report.rdlc">
     <DataSources>
         <rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="Students_sp_StoredProcedure" />
     </DataSources>
     </LocalReport>
</rsweb:ReportViewer>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetData"
     TypeName="StudentsTableAdapters.sp_StoredProcedureTableAdapter" OldValuesParameterFormatString="{0}">
     <SelectParameters>
          <asp:ControlParameter ControlID="txtParam1" Name="PARAM_1" PropertyName="Text" Type="String" />
          <asp:ControlParameter ControlID="txtParam2" Name="PARAM_2" PropertyName="Text" Type="String" />
          <asp:ControlParameter ControlID="txtParam3" Name="PARAM_3" PropertyName="Text" Type="String" />
          <asp:ControlParameter ControlID="txtParam4" Name="PARAM_4" PropertyName="Text" Type="String" />         
     </SelectParameters>   
</asp:ObjectDataSource>

I have a DataSet (.xsd) defined that uses a stored procedure that contains all these parameters and I added all the parameters to the report via the Report menu in Visual Studio 2005.

When I access the .aspx page that has the ReportViewer on it, I get the following error.

The 'Withdrawn' parameter is missing a value

If I assign default values for the report parameters via the Report menu in Visual Studio 2005, I get the following error.

  • ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'GetData' that has parameters: PARAM_1, PARAM_2, PARAM_3 PARAM_4.
  • Can somebody please point me in the right direction?

    Thanks in advance for your help.

     


  • Viewing all articles
    Browse latest Browse all 1418

    Trending Articles



    <script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>