locked
how to pass value in reportviewer RRS feed

  • Question

  • User231357110 posted

    i need using report viewer tool and get details,

    how to pass the value in reportviewer(rdlc)

    i write coding but its showing below error..

    Error   234 The Value expression for the text box ‘Textbox176’ has a scope parameter that is not valid for an aggregate function.  The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a dataset.<b></b>
    Friday, May 15, 2015 10:07 AM

Answers

  • User1711366110 posted


    i need using report viewer tool and get details,
    how to pass the value in reportviewer(rdlc)

      As per this case, you can pass the parameter value to rdlc by using C# like below :

    Dataset ds= GetData(); //get your database value to dataset here
    
    ReportDataSource datasource = new ReportDataSource("dsname", ds.Tables[0]);
    
    ReportParameter[] param = new ReportParameter[1];
    param[0] = new ReportParameter("ParamName", Textbox176.Text.Trim());
    reportViewer1.ProcessingMode = ProcessingMode.Local;
    reportViewer1.LocalReport.ReportPath = Server.MapPath("~/Report.rdlc");
    
    reportViewer1.LocalReport.SetParameters(param);
    reportViewer1.LocalReport.DataSources.Clear();
    reportViewer1.LocalReport.DataSources.Add(datasource);
    reportViewer1.RefreshReport();
    

    Further any queries ,please provide your workout code which may help us to resolve the issue.

    --
    with regards,
    Edwin

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, May 17, 2015 10:45 PM