Our insatiable commitment to deliver more than expected in every aspect of our products resulted in me being curious, if we are as flexible as we think and whether one can always achieve his goal be it out of the box or with custom solution using our API and other controls if necessary.
Hmmm what could that custom solution be – how about a custom Toolbar for our web ReportViewer. For those of you, who are unfamiliar with our Web ReportViewer , here is a short description – it is designed to render Telerik Reports within ASP.NET projects and it has a toolbar that provides basic functionality for interacting with the currently-loaded report, such as:
Ok these seem all fine and dandy, but what if we wanted to add another button that does something else for us – let’s say export and send the report as email attachment (for more info on that check out my previous blog post).
var viewer = <%=ReportViewer1.ClientID%>
Once you have the client-side object you can use the exposed methods that are outlined in this help article. Now the question at hand is what UI should we provide for our custom toolbar, once we hide the built-in toolbar – what best option than our own Toolbar for ASP.NET AJAX. One look at it and it is clear that the OnClientButtonClickingHandler client handler would be where we would implement all of the interacting.
I would not go in details about the code, as I think a screenshot and attached working application worth a thousand words.
Stefan’s main interests outside the .NET domain include rock music, playing the guitar and swimming.