protected void ShowReport() { var SelectedPriorities = GetSelectedList(ddlPriorities); //var Priority = ddlPriorities.Items.Count == SelectedPriorities.Count ? new List<string> { } : SelectedPriorities; var Priority = SelectedPriorities.Count == 0 ? new List <string> { } : SelectedPriorities; var SelectedKyes = GetSelectedList(ddlKeys); //var Keys = ddlKeys.Items.Count == SelectedKyes.Count ? new List<string> { } : SelectedKyes; var Keys = SelectedKyes.Count == 0 ? new List <string> { } : SelectedKyes; var SelectedRanks = GetSelectedList(ddlRanks); //var Ranks = ddlRanks.Items.Count == SelectedRanks.Count ? new List<string> { } : SelectedRanks; var Ranks = SelectedRanks.Count == 0 ? new List <string> { } : SelectedRanks; var report = new MDMSVC.DC_NewDashBoardReport_RQ(); report.Priorities = Priority.ToArray(); report.Keys = Keys.ToArray(); report.Ranks = Ranks.ToArray(); var DataSet1 = MapSvc.GetNewDashboardReport_CountryWise(report); ReportDataSource rds = new ReportDataSource("DataSet1", DataSet1); CountryReportViewer.LocalReport.DataSources.Clear(); CountryReportViewer.LocalReport.ReportPath = "staticdata/HotelMappingCountryReport.rdlc"; CountryReportViewer.LocalReport.DataSources.Add(rds); CountryReportViewer.Visible = true; CountryReportViewer.ZoomMode = Microsoft.Reporting.WebForms.ZoomMode.PageWidth; CountryReportViewer.DataBind(); CountryReportViewer.LocalReport.Refresh(); }
//GAURAV_TMAP_876 protected void btnViewReport_Click(object sender, EventArgs e) { var SelectedRegions = GetSelectedList(ddlRegion); var Region = ddlRegion.Items.Count == SelectedRegions.Count ? new List <string> { } : SelectedRegions; var SelectedCountries = GetSelectedList(ddlCountry); var Country = ddlCountry.Items.Count == SelectedCountries.Count ? new List <string> { } : SelectedCountries; var SelectedPriorities = GetSelectedList(ddlPriorities); var Priority = SelectedPriorities.Count == 0 ? new List <string> { } : SelectedPriorities; var SelectedKyes = GetSelectedList(ddlKeys); var Keys = SelectedKyes.Count == 0 ? new List <string> { } : SelectedKyes; var SelectedRanks = GetSelectedList(ddlRanks); var Ranks = SelectedRanks.Count == 0 ? new List <string> { } : SelectedRanks; var City = new List <string> { }; if (rdoIsAllCities.Checked) { City = Cities; } if (rdoIsSelectiveCities.Checked) { foreach (RepeaterItem item in repSelectedCity.Items) { Label lblCityId = (Label)item.FindControl("lblCityId"); Cities.Add(lblCityId.Text); } City = Cities; } var report = new MDMSVC.DC_NewDashBoardReport_RQ(); report.Country = Country.ToArray(); report.Region = Region.ToArray(); report.City = City.ToArray(); report.Priorities = Priority.ToArray(); report.Keys = Keys.ToArray(); report.Ranks = Ranks.ToArray(); // Bind data to Report and Show report var reportResponse = mappingSVC.GetHotelMappingReport_CityWise(report); ReportDataSource rds = new ReportDataSource("DataSet1", reportResponse); CityReportViewer.LocalReport.DataSources.Clear(); CityReportViewer.LocalReport.ReportPath = "staticdata/HotelMappingCityReport.rdlc"; CityReportViewer.LocalReport.DataSources.Add(rds); CityReportViewer.ZoomMode = Microsoft.Reporting.WebForms.ZoomMode.PageWidth; CityReportViewer.DataBind(); CityReportViewer.LocalReport.Refresh(); }