Hey,
We have updated our controls to Q1 2013. Since this update all the paramater values are null in code behind.
Our report has a chart and a table.
The table is bound to a Objectdatasource. The function behind this ObjectDatasource gets al the params correct.
The chartseries are set from the code in the function OnNeedDataSource here the parameters (ReportParameters["SelectedBeginMonth"].value) aren't set since the new update.
Below the code we use.
The client code from silverlight
The code behind of the report
We have updated our controls to Q1 2013. Since this update all the paramater values are null in code behind.
Our report has a chart and a table.
The table is bound to a Objectdatasource. The function behind this ObjectDatasource gets al the params correct.
The chartseries are set from the code in the function OnNeedDataSource here the parameters (ReportParameters["SelectedBeginMonth"].value) aren't set since the new update.
Below the code we use.
The client code from silverlight
.........
reportViewer.Parameters["SelectedBeginMonth"] = selectedBeginMonth; reportViewer.Parameters["SelectedDuration"] = selectedDuration;if (string.IsNullOrEmpty(reportViewer.Report)) { //first time => setting the report will automatically load it reportViewer.Report = "Anton.Server.Reports.M01_OrganisationModule.KeyFigures.KeyFigures, Anton.Server.Reports, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"; } else { reportViewer.RefreshReport(); }The code behind of the report
(the params aren't correct)
protected override void OnNeedDataSource(object sender, EventArgs e) { base.OnNeedDataSource(sender, e); SetColumnWidth(); SetColumnWidthRemarks(); DateTime selectedBeginMonth = new DateTime(DateTime.Today.Year,DateTime.Today.Month,1); if (ReportParameters["SelectedBeginMonth"].Value != null) { DateTime.TryParse(ReportParameters["SelectedBeginMonth"].Value.ToString(), out selectedBeginMonth); } int selectedDuration = 0; if (ReportParameters["SelectedDuration"].Value != null) { int.TryParse(ReportParameters["SelectedDuration"].Value.ToString(), out selectedDuration); } keyFiguresChart.Series.Clear(); for (int i = 0; i < selectedDuration; i++) { var serie = new ChartSeries { DataYColumn = "Year" + (i + 1), Name = selectedBeginMonth.AddYears(i).ToString("dd/MM/yyyy") + " - " + selectedBeginMonth.AddYears(i + 1).AddDays(-1).ToString("dd/MM/yyyy"), }; serie.Appearance.ShowLabels = false; keyFiguresChart.Series.Add(serie); } }The method that is bound to the objectdatasource of the table(the params are correct)Sodi WepublicIQueryable<KeyFiguresDto> GetKeyFiguresDtoForOtherData(boolshowNewEmployees,boolshowPercentageFemales,boolshowPercentageMales,boolshowPercentageUnknownGender,boolshowPercentageInflow,boolshowPercentageOutflow,boolshowPercentageParttimeEmployees,boolshowPercentageXYearsSeniority,boolshowPercentageYoungEmployees,intkeyFigureReportAge,intkeyFigureReportSeniority, DateTime selectedBeginMonth,intselectedDuration){selectedBeginMonth = selectedBeginMonth.AddYears(-selectedDuration).AddMonths(1);var endMonth = selectedBeginMonth.AddYears(selectedDuration).AddDays(-1);List<KeyFiguresDto> result =newList<KeyFiguresDto>();List<KeyFiguresEmployeesDto> employeeAtServiceForPeriod =newList<KeyFiguresEmployeesDto>();........