1

I am for last 2 days i am stuck in this error in rdlc. I have gone through most of the pages showing solution for this but still I didn't got the solution. I am passing parametes from main report to sub report also checked weather type of parameter is correct in both reports, I have also added the following codes

protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                rptViewer.LocalReport.EnableHyperlinks = true;
            }
            rptViewer.LocalReport.SubreportProcessing += new

                             SubreportProcessingEventHandler(SetSubDataSource);

            this.rptViewer.LocalReport.Refresh();
        }
        public void SetSubDataSource(object sender, SubreportProcessingEventArgs e)
        {

            e.DataSources.Add(new ReportDataSource("testDs", "test_Ds"));

        }

where testDs is my dataset for Subreport and test_Ds is the DataSource for the subreport I am not quite sure on the last part whether it is correct or wrong. Please help me out

 <form id="form1" runat="server">
        <div style="width: 100%; height: 100%; padding: 05px 0px 5px 100px;">
            <rsweb:ReportViewer ID="rptViewer" runat="server" SizeToReportContent="True" EnableHyperlinks="True" HyperlinkTarget="_blank" BackColor="#33ccff" BorderColor="Tomato"></rsweb:ReportViewer>
        </div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>

this is what i added in aspx page

Binoy Kumar
  • 422
  • 3
  • 17

0 Answers0