This is a migrated thread and some comments may be shown as answers.

Bug using reportparameters in reportbook

2 Answers 34 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jeroen
Top achievements
Rank 1
Iron
Jeroen asked on 09 Sep 2016, 01:25 PM

Hello,

I'm using Q2 2015 and have the following problem.

 

When I create a reportbook

 

ReportBook reportBook = new ReportBook();
                reportBook.Reports.Add(new Total());
                reportBook.Reports[0].ReportParameters["DateFrom"].Value = paramBlock.GetParameterValues(ParamID.WeekDate).Value1;
                reportBook.Reports[0].ReportParameters["DateTo"].Value = paramBlock.GetParameterValues(ParamID.WeekDate).Value2;
                reportBook.Reports[0].DataSource = paramBlock.TotalCustomers;                                                                              
                reportBook.Reports.Add(new AfvalPercentageVervolgChecks());
                reportBook.Reports[1].ReportParameters["DateFrom"].Value = paramBlock.GetParameterValues(ParamID.WeekDate).Value1;
                reportBook.Reports[1].ReportParameters["DateTo"].Value = paramBlock.GetParameterValues(ParamID.WeekDate).Value2;
                //reportBook.Reports[1].DataSource = paramBlock.ExpectedChecks;
                //reportBook.Reports.Add(new VervolgChecks());
                //reportBook.Reports[2].ReportParameters["DateFrom"].Value = paramBlock.GetParameterValues(ParamID.WeekDate).Value1;
                //reportBook.Reports[2].ReportParameters["DateTo"].Value = paramBlock.GetParameterValues(ParamID.WeekDate).Value2;
                //reportBook.Reports[2].DataSource = paramBlock.ExpectedChecks;
                reportBook.Reports.Add(new BankAfval());
                reportBook.Reports[2].ReportParameters["DateFrom"].Value = paramBlock.GetParameterValues(ParamID.WeekDate).Value1;
                reportBook.Reports[2].ReportParameters["DateTo"].Value = paramBlock.GetParameterValues(ParamID.WeekDate).Value2;
                reportBook.Reports[2].DataSource = paramBlock.CollectRuns;                
                reportBook.Reports.Add(new AfvalPercentageWeek());
                reportBook.Reports[3].ReportParameters["DateFrom"].Value = paramBlock.GetParameterValues(ParamID.RecruiterDate).Value1;
                reportBook.Reports[3].ReportParameters["DateTo"].Value = paramBlock.GetParameterValues(ParamID.RecruiterDate).Value2;                
                reportBook.Reports[3].DataSource = paramBlock.Refuse;
                reportBook.Reports.Add(new IssuesPerMonth());
                reportBook.Reports[4].ReportParameters["DateFrom"].Value = paramBlock.GetParameterValues(ParamID.WeekDate).Value1;
                reportBook.Reports[4].ReportParameters["DateTo"].Value = paramBlock.GetParameterValues(ParamID.WeekDate).Value2;
                reportBook.Reports[4].DataSource = paramBlock.Issues;

 

The report AfvalPercentageWeek() had different values for the reportparameters.

However those values are not used, instead the values of the first (?) report are used.

 

Renaming the report parameters is a work around, but I believe this to be a bug.

 

Or is this as designed?

 

Jeroen

2 Answers, 1 is accepted

Sort by
0
Accepted
Stef
Telerik team
answered on 10 Sep 2016, 01:05 PM
Hello Jeroen,

Please check each report's ReportParameters collection and the settings of the individual parameters. All parameters Mergeable property must be set to false to avoid merging their values in the Report Book - Report Book Parameters.


I hope this helps.

Regards,
Stef
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Jeroen
Top achievements
Rank 1
Iron
answered on 12 Sep 2016, 12:35 PM

Thank you,

 

I overlooked this option.

 

Jeroen

Tags
General Discussions
Asked by
Jeroen
Top achievements
Rank 1
Iron
Answers by
Stef
Telerik team
Jeroen
Top achievements
Rank 1
Iron
Share this question
or