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

Is there a event to tell when a report control's Action is triggered?

2 Answers 72 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 22 Oct 2010, 04:54 PM
I'm starting with the trial for reporting and Web toolkits using VS2010, 4.0 framework.  I have a web application with a report viewer that is consuming reports defined on a separate dll library.  In one report I have a field (textbox) that has what I want to be "active"content - meaning I want the user to click that textbox and have it navigate to another report serving much like a drill down.  This I have been able to accomplish.

Additionally, I am trying to maintain a set of navigation hyperlinks outside the report/report viewer that can also serve a similar report navigation purpose.  These hyperlinks would instruct the report viewer to change its report source, parameters, etc.  The key here is that I am creating an alternative to a document map - its just a business requirement.

How would I know when the user has clicked on the report field, thus triggering the navigation action?  I need to know this because I need to update the hyperlinks to reflect the new report "context".  I'm a bit dumbfounded by the lack of useful events in the report control hierarchy.  The report viewer appears to be blissfully ignorant of important actions like the one described above...  is this true or am I just missing something obvious?

Thanks in advance,
Ed

2 Answers, 1 is accepted

Sort by
0
Ed
Top achievements
Rank 1
answered on 25 Oct 2010, 01:34 PM
(bump)  Does anyone have an opinion on this?  I really like the telerik controls and I would hate to find something as mundane as this to be a deal-breaker during evaluation.  Anyone?
0
Peter
Telerik team
answered on 27 Oct 2010, 04:31 PM
Hello Ed,

We are not sure about the exact scenario you are after, but generally if you want to navigate to a web page with a Web Report Viewer and set the viewers source you can instantiate the desired report by a querysting of the assembly qualified name of the report you want to show. Check out the following example code snippet:

string reportName = Server.UrlDecode(this.Request.QueryString["ReportName"]);
 
if (!string.IsNullOrEmpty(reportName))
{
    Type reportType = Type.GetType(reportName);
    IReportDocument report = (IReportDocument)Activator.CreateInstance(reportType);
    this.ReportViewer1.Report = report;
}  

Currently we don't provide Action's events. However you can have a Report Parameter with Visibility set to False and default Value set to False and when Actions is used to navigate to that report to change the report parameter value to True. Then you can use this parameter as an indication that an Action was used.

All the best,
Peter
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Ed
Top achievements
Rank 1
Answers by
Ed
Top achievements
Rank 1
Peter
Telerik team
Share this question
or