|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace CpReportCustomData
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
rptViewer.LocalReport.SubreportProcessing +=
new Microsoft.Reporting.WebForms.SubreportProcessingEventHandler(LocalReport_SubreportProcessing);
}
}
void LocalReport_SubreportProcessing(
object sender,
Microsoft.Reporting.WebForms.SubreportProcessingEventArgs e)
{
// get empID from the parameters
int iEmpID = Convert.ToInt32(e.Parameters[0].Values[0]);
// remove all previously attached Datasources, since we want to attach a
// new one
e.DataSources.Clear();
// Retrieve employeeFamily list based on EmpID
var employeeFamily = CpReportCustomData.Data.CustomDS.GetAllEmployeeFamily()
.FindAll(element => element.ID == iEmpID);
// add retrieved dataset or you can call it list to data source
e.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource()
{
Name = "DSEmployeeFamily",
Value = employeeFamily
});
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
He used to have biography here
, but now he will hire someone (for free offcourse
), Who writes his biography on his behalf
He is Great Fan of Mr.
Johan Rosengren (his idol),
Lim Bio Liong,
Nishant S and
DavidCrow and Believes that, he will EXCEL in his life by following there steps!!!
He started with Visual C++ then moved to C# then he become language agnostic, you give him task,tell him the language or platform, he we start immediately, if he knows the language otherwise he quickly learn it and start contributing productively
Last but not the least, For good 8 years he was Visual CPP MSMVP!