如题,在网上找了无数个都是以前版本的,尝试了都不行。 public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
ReportViewer1.Drillthrough += new DrillthroughEventHandler(ReportViewer1_Drillthrough);
} protected void ReportViewer1_Drillthrough(object sender, Microsoft.Reporting.WebForms.DrillthroughEventArgs e)
{
LocalReport localReport = (LocalReport)e.Report;
localReport.ReportPath = MapPath("Report2.rdlc");
string UserId = localReport.GetParameters()["UserId"].Values[0].Trim();
DataTable dt = new Web_NewsTableAdapter().GetData(UserId);
localReport.DataSources.Clear();
localReport.DataSources.Add(new ReportDataSource("DataSet1",dt));
}
} 这行代码DataTable dt = new Web_NewsTableAdapter().GetData(UserId);
提示"GetData"方法没有任何重载采用"1"个参数
不知道要如何修正
{
protected void Page_Load(object sender, EventArgs e)
{
ReportViewer1.Drillthrough += new DrillthroughEventHandler(ReportViewer1_Drillthrough);
} protected void ReportViewer1_Drillthrough(object sender, Microsoft.Reporting.WebForms.DrillthroughEventArgs e)
{
LocalReport localReport = (LocalReport)e.Report;
localReport.ReportPath = MapPath("Report2.rdlc");
string UserId = localReport.GetParameters()["UserId"].Values[0].Trim();
DataTable dt = new Web_NewsTableAdapter().GetData(UserId);
localReport.DataSources.Clear();
localReport.DataSources.Add(new ReportDataSource("DataSet1",dt));
}
} 这行代码DataTable dt = new Web_NewsTableAdapter().GetData(UserId);
提示"GetData"方法没有任何重载采用"1"个参数
不知道要如何修正
我也有同样的问题!