
Sony Telkar
Top achievements
Rank 1
Sony Telkar
asked on 03 Jun 2009, 11:25 AM
I have to pass two parameters to subreport one is username and the other is sortby(column name will be entered by user). I am able to filter the data based on the selected username but I am not able to sort based on the parameter entered by the user(only the default value given in the report parameter for sort is getting sorted). I guess the sort parameter is not getting passed to the sub report.
Also my doubt is when I select any username will the sort option be applied to the entire report data or only the selected username report data?
Any help will be appreciated.
Thanks
Also my doubt is when I select any username will the sort option be applied to the entire report data or only the selected username report data?
Any help will be appreciated.
Thanks
5 Answers, 1 is accepted
0
Hi Sony Telkar,
The same question has been asked by several users before. Please, visit the following blog post, which gives a step-by-step example how to alter the sorting criteria of a report, according to the chosen value of a report parameter.
If you have more questions regarding this topic, please, do not hesitate to ask.
Sincerely yours,
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
The same question has been asked by several users before. Please, visit the following blog post, which gives a step-by-step example how to alter the sorting criteria of a report, according to the chosen value of a report parameter.
If you have more questions regarding this topic, please, do not hesitate to ask.
Sincerely yours,
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Sony Telkar
Top achievements
Rank 1
answered on 12 Jun 2009, 10:59 AM
I have gone through all the threads relating to this but couldnt find anything which could help me.
What if I had to pass a parameter for a procedure through a report and the same parameter from a sub report within the same report.
Assuming both the reports get the data from the same procedure but the display format is different.
Thanks
What if I had to pass a parameter for a procedure through a report and the same parameter from a sub report within the same report.
Assuming both the reports get the data from the same procedure but the display format is different.
Thanks
0
Hi Sony,
I'm afraid that your last reply is not very clear. The datasource of the report and report parameters is not relevant to the filter and sort functionality i.e. the report is not aware of where the data comes from and whether the report that is bound to it is a main or detail report.
If still having problems and as the information about your scenario is pretty obscure, it would be best if you provide us with a sample dummy project which shows what you want.
Sincerely yours,
Steve
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I'm afraid that your last reply is not very clear. The datasource of the report and report parameters is not relevant to the filter and sort functionality i.e. the report is not aware of where the data comes from and whether the report that is bound to it is a main or detail report.
If still having problems and as the information about your scenario is pretty obscure, it would be best if you provide us with a sample dummy project which shows what you want.
Sincerely yours,
Steve
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Sony Telkar
Top achievements
Rank 1
answered on 17 Jun 2009, 01:23 PM
What I was trying to convey is I have a Main report which calls procedure A which takes parameter B. At the same time I have a subreport with in the Main report which also calls the procedure A and takes a parameter B. This parameter comes from the front end as date. My question is its getting passed to the main report but not the subreport.
0
Hi Sony,
I've used the project from this KB article to mimic the scenario you've described and was not able to reproduce such a problem. Here is the code I've used for accessing the parameter of the subreport from the web application:
protected void Page_Load(object sender, EventArgs e)
{
Telerik.Reporting.Report rpt = new Main();
ReportViewer1.Report = rpt;
Telerik.Reporting.SubReport subreportItem = rpt.Items.Find("subReport1", true)[0] as Telerik.Reporting.SubReport;
subreportItem.ReportSource.ReportParameters["Parameter1"].Value = "test param";
}
Best wishes,
Steve
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I've used the project from this KB article to mimic the scenario you've described and was not able to reproduce such a problem. Here is the code I've used for accessing the parameter of the subreport from the web application:
protected void Page_Load(object sender, EventArgs e)
{
Telerik.Reporting.Report rpt = new Main();
ReportViewer1.Report = rpt;
Telerik.Reporting.SubReport subreportItem = rpt.Items.Find("subReport1", true)[0] as Telerik.Reporting.SubReport;
subreportItem.ReportSource.ReportParameters["Parameter1"].Value = "test param";
}
Best wishes,
Steve
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.