protected void Page_Load(object sender, EventArgs e)
{
DataSet1TableAdapters.authorsTableAdapter ds = new DataSet1TableAdapters.authorsTableAdapter();
ds.ClearBeforeFill = true;
DataSet1.authorsDataTable dt=new DataSet1.authorsDataTable();
ds.Fill(dt, "ca");
ReportViewer1.LocalReport.ReportPath = Server.MapPath("Pubs.rdlc");
ReportViewer1.LocalReport.SubreportProcessing += new Microsoft.Reporting.WebForms.SubreportProcessingEventHandler(subReports);
}
void subReports(object sender, SubreportProcessingEventArgs e)
{
if (e.ReportPath.Equals("ClientSubReport"))
{
if (e.Parameters.Count > 0)
{
DataSet2TableAdapters.employeeTableAdapter da = new DataSet2TableAdapters.employeeTableAdapter();
da.ClearBeforeFill = true;
DataSet2.employeeDataTable dt = new DataSet2.employeeDataTable();
da.Fill(dt);
e.DataSources.Add(new ReportDataSource("DataSet2_employee",dt));
}
}
}
Popular Posts
|
No comments:
Post a Comment