However, on my child report, I cannot figure out how to access this parameter. It is not being passed into the constructor (get an error if I force the constructor to accept a parameter) and the "Load" and "Init" events of the child report do not fire. The value of the Report.Parameter I have defined is null.
How can I access this passed-in parameter value?
7 Answers, 1 is accepted
When utilizing the drill-through functionality the report parameter is not passed through the constructor and you cannot force the constructor to accept parameters. However after the target report is initialized you can access the report parameter in an expression, event or method - you do not need to write code to get that value, it is already there.
You can check the Using Report Parameters in Expressions help article to see how to use report parameters in expressions. If you want to use them programmatically (e.g. in the NeedDataSource event) you can check the Using Report Parameters programmatically article.
the Telerik team
I know this is an old post, but where is the VIDEO that Darrien is talking about? I need to see how this work so I can apply it with my Summary/Detail Report.
After reviewing the links that IvanY posted, I am still having issue seeing Report Parameter in the Child Report. I am programmatically setting up the DrillThrough, yet, I am not sure how my child report sees the parameter I want it to report on. The Using Report Parameters in Expressions and Using Report Parameters programmatically have not been any help.
I have it working, just need help on the Programmatically side of things..maybe. I do have my subform showing up with data that I am expecting. This is a good thing. I have a few questions though.
1. Is there a way I can hide the "Parameters" box at the top of the viewer programmatically?
2. Is there a way to prevent to users for opening the Parameters area at the top?
On configuring the NavigatetoReportAction you are settings its ReportSource property. The ReportSource property has a Parameters collection, which is mapped by key to the selected report's ReportParameters collection.
Thus to pass a value to a parameter in the sub report, you need to add its key and the desired value as expression in the NavigatetoReportAction.ReportSource.Parameters collection.
About hiding the viewer's parameters area, if all report parameters are hidden (Visible set to false) the area will not be displayed. To provide values for report parameters you will have to update the viewer's ReportSource.Parameters collection.
More details about Report Sources are available here.
Let us know if you have any further questions.