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

Passing Drillthrough Parameter with Dynamic Data Binding

7 Answers 103 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Darrien
Top achievements
Rank 1
Darrien asked on 07 Oct 2011, 01:33 PM
We are binding our reports through the code-behind.  I need to create a drillthrough report.  I have watched the video, and set up the Master report action correctly -- I selected the child report using the "Select Report Document" and I created the target report parameter. On the Child Report, I have created the parameter to match the one specified within the master.

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

Sort by
0
Darrien
Top achievements
Rank 1
answered on 11 Oct 2011, 03:22 PM
Any word on this?  I can get the basic functionality using the Navigate to URL option, but it requires some different coding and loses the report viewer navigation one expects with drill-through reports.
0
IvanY
Telerik team
answered on 12 Oct 2011, 01:29 PM
Hi Darrien,

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.

All the best,
IvanY
the Telerik team

Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.

0
Darrien
Top achievements
Rank 1
answered on 12 Oct 2011, 01:48 PM
Thank you.  That is what I needed; the value was not set until the NeedDataSource event.
0
Mark
Top achievements
Rank 2
Veteran
answered on 29 Oct 2015, 07:34 PM

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.

 

Thanks     

0
Mark
Top achievements
Rank 2
Veteran
answered on 29 Oct 2015, 07:57 PM

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.

 

Thanks

 

0
Mark
Top achievements
Rank 2
Veteran
answered on 30 Oct 2015, 12:06 PM

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?

 

Thanks

0
Stef
Telerik team
answered on 03 Nov 2015, 03:34 PM
Hello Mark,

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.

Regards,
Stef
Telerik
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
Tags
General Discussions
Asked by
Darrien
Top achievements
Rank 1
Answers by
Darrien
Top achievements
Rank 1
IvanY
Telerik team
Mark
Top achievements
Rank 2
Veteran
Stef
Telerik team
Share this question
or