Hyperlink Event
Data Dynamics Reports Support
Hyperlink Event
05-08-2009, 9:26 AM
I've been evaluating both ActiveReports for .NET 3 and Data Dynamics Reports. We are looking to integrate a reporting tool into our Windows application. My opinion is that DDR fits our requirements better than AR. One feature in AR, though, that I can't seem to reproduce in DDR is the Hyperlink event in the AR Viewer.
We have a use case where a user clicks on an item in the report (e.g. an order id) and this causes an order window to pop-up from our existing application. I can accomplish this in AR using the Viewer's Hyperlink event. I handle the event, parse the link, instantiate the form in our existing app, and then set the HyperlinkEventArgs.Handled property to true to tell the Viewer that it doesn't need to do anything.
I read the following post: http://www.datadynamics.com/forums/110229/ShowPost.aspx and thought a custom ResourceLocator might do the trick in DDR. While I was able to create a custom ResourceLocator that was able to parse a textbox's drilldown Uri and display the pop-up window, I couldn't figure out how to stop DDR from tyring to instantiate a drilldown report. It came up with the error message: Report to execute not found or failed.
I also tried to use the custom ResourceLocator to parse a textbox's Hyperlink property, but that didn't work either. Is there a way to do this currently in DDR, or is there any pending case number that would add this capability?
Re: Hyperlink Event
05-08-2009, 11:49 PM
Hello,
I would recommend you the following way:
Use Jump To Bookmark action for the textbox instead of the Hyperlink action.
In the expression for the bookmark make the call to the code of the custom assembly. You can find more information in the
online help
.
So, when DDR will try to resolve the bookmark by calling the code of the custom assembly, you can open the new window and return null for the bookmark. If DDR core can't locate the returned bookmark, then no error occurs.
Let us know if you need further assistance or the working example of the approach I described.
Sergey Abakumoff
GrapeCity
Re: Hyperlink Event
05-11-2009, 11:52 AM
I gave that a try. What seems to be happening is that the call to the custom method is executing as the report is rendering, not when the user clicks on the bookmark.
Re: Hyperlink Event
05-11-2009, 9:44 PM
Sorry for giving incorrect tip!
Yep, the bookmark link is resolved at rendering time. So, the only way to execute the custom code when user clicks on the report item is using custom resource locator for the drill through links. I have entered case 129956 - once it is implemented, the error will not fire if the drill through report can not be resolved. Once the build that includes the fix is prepared to be published, you will be notified about that. We plan to release the maintenance build this or next week.
Sergey Abakumoff
GrapeCity
Re: Hyperlink Event
05-12-2009, 6:59 AM
Thank you!
Re: Hyperlink Event
07-02-2009, 1:15 PM
Hi Sergey,
Is there any news related to case 129956? I've checked the last couple of maintenance builds, and there doesn't appear to be any change. The last build I tried was 1.6.1318.0. It sounded like a build that addressed this case number would be available in a week or two, but I understand if there's been some delay.
Thanks
Re: Hyperlink Event
07-02-2009, 8:17 PM
Hello,
We recently implemented the functionality that was requested in case 129956. We will provide you with the build that includes this functionality shortly.
Sergey Abakumoff
GrapeCity
Re: Hyperlink Event
07-08-2009, 3:11 AM
This functionality has been added in the latest build (1.6.1362.0). You may download this build from
here
.
A new ‘Action’ event has been added to the ‘ReportPreview’ control. This event will be raised whenever an action is initiated (like Jump to Report, Jump to Bookmark, Jump to URL).
For example, if a Textbox (with Hyperlink) action is clicked, then you can trap this event and then execute the code.
Please find attached a sample application in which I have implemented the said functionality.
Regards,
Amit
Amit Pal
GrapeCity- DataDynamics
Re: Hyperlink Event
07-08-2009, 2:37 PM
I tried out the latest build, and it appears to work beautifully.
Thanks so much!