private void ProjectTypeReport_ReportStart(object sender, EventArgs e) { this.PrintedBy.Text = string.Format("Printed By: {0}", HttpContext.Current.User.Identity.Name); var ds1 = new XMLDataSource(); ds1.NodeList = (System.Xml.XmlNodeList)((XMLDataSource)this.DataSource).Field("ProjectByOrganisation/ProjectTypeDetail", true); this.ProjectByOrgSubReport.Report = new ProjectTypeSubReport(IsDownloadedAsCsv); this.ProjectByOrgSubReport.Report.DataSource = ds1; var ds2 = new XMLDataSource(); ds2.NodeList = (System.Xml.XmlNodeList)((XMLDataSource)this.DataSource).Field("ProjectByType/ProjectTypeDetail", true); this.ProjectByTypeSubReport.Report = new ProjectTypeSubReport(IsDownloadedAsCsv); this.ProjectByTypeSubReport.Report.DataSource = ds2; var ds3 = new XMLDataSource(); ds3.NodeList = (System.Xml.XmlNodeList)((XMLDataSource)this.DataSource).Field("ProjectByESA/ProjectTypeDetail", true); this.ProjectByESASubReport.Report = new ProjectTypeSubReport(IsDownloadedAsCsv); this.ProjectByESASubReport.Report.DataSource = ds3; var ds4 = new XMLDataSource(); ds4.NodeList = (System.Xml.XmlNodeList)((XMLDataSource)this.DataSource).Field("ProjectByState/ProjectTypeDetail", true); this.ProjectByStateSubReport.Report = new ProjectTypeSubReport(IsDownloadedAsCsv); this.ProjectByStateSubReport.Report.DataSource = ds4; var ds5 = new XMLDataSource(); ds5.NodeList = (System.Xml.XmlNodeList)((XMLDataSource)this.DataSource).Field("ProjectByNational/ProjectTypeDetail", true); this.ProjectByNationalSubReport.Report = new ProjectTypeSubReport(IsDownloadedAsCsv); this.ProjectByNationalSubReport.Report.DataSource = ds5; }
private void ProgressReport_ReportStart(object sender, EventArgs e) { var serviceProviderDs = new XMLDataSource(); serviceProviderDs.NodeList = (System.Xml.XmlNodeList)((XMLDataSource)this.DataSource).Field("Progress", true); this.DataSource = serviceProviderDs; this.PrintedBy.Text = string.Format("Printed By: {0}", HttpContext.Current.User.Identity.Name); }
private void SiteVisitReport_ReportStart(object sender, EventArgs e) { this.PrintedBy.Text = string.Format("Printed By: {0}", HttpContext.Current.User.Identity.Name); var ds = new XMLDataSource(); ds.NodeList = (System.Xml.XmlNodeList)((XMLDataSource)this.DataSource).Field("SiteVisit", true); this.DataSource = ds; }
private void DashboardReport_ReportStart(object sender, EventArgs e) { var serviceProviderDs = new XMLDataSource(); serviceProviderDs.NodeList = (System.Xml.XmlNodeList)((XMLDataSource)this.DataSource).Field("Dashboard", true); this.DataSource = serviceProviderDs; this.chart1.DataSource = serviceProviderDs; var points = this.chart1.Series[0].Points; foreach (DataPoint point in points) { point.LegendText = point.XValue.ToString(); int y; int.TryParse(point.YValues[0].ToString(), out y); point.DisplayInLegend = y > 0; } this.PrintedBy.Text = string.Format("Printed By: {0}", HttpContext.Current.User.Identity.Name); }
private XMLDataSource CreateXmlDataSource <T>(T model) { var xmlDocument = new XmlDocument(); using (var stringwriter = new StringWriter()) { var serializer = new System.Xml.Serialization.XmlSerializer(model.GetType()); serializer.Serialize(stringwriter, model); xmlDocument.LoadXml(stringwriter.ToString()); } var xmlDataSource = new XMLDataSource(); xmlDataSource.LoadXML(xmlDocument.InnerXml); xmlDataSource.FileURL = "."; if (xmlDocument.DocumentElement != null) { xmlDataSource.RecordsetPattern = xmlDocument.DocumentElement.Name; } return(xmlDataSource); }
private void FindingSummaryReport_ReportStart(object sender, EventArgs e) { this.PrintedBy.Text = string.Format("Printed By: {0}", HttpContext.Current.User.Identity.Name); var ds1 = new XMLDataSource(); ds1.NodeList = (System.Xml.XmlNodeList)((XMLDataSource)this.DataSource).Field("InScopeReview/FindingSummaryDetail", true); this.InScopeSubReport.Report = new FindingSummarySubReport(IsDownloadedAsCsv); this.InScopeSubReport.Report.DataSource = ds1; var ds2 = new XMLDataSource(); ds2.NodeList = (System.Xml.XmlNodeList)((XMLDataSource)this.DataSource).Field("OutScopeReview/FindingSummaryDetail", true); this.OutScopeSubReport.Report = new FindingSummarySubReport(IsDownloadedAsCsv); this.OutScopeSubReport.Report.DataSource = ds2; var ds3 = new XMLDataSource(); ds3.NodeList = (System.Xml.XmlNodeList)((XMLDataSource)this.DataSource).Field("RecoveryReview/FindingSummaryDetail", true); this.RecoverySubReport.Report = new FindingSummarySubReport(IsDownloadedAsCsv); this.RecoverySubReport.Report.DataSource = ds3; }