I would like to add a custom button to the HTML 5 Report Viewer's toolbar. Is there an example of how to accomplish this?
So far I have managed to create a functional custom button by adding a link to the template with a new data-command attribute, and then adding a new command to the report viewer object (see below).
This works, and my custom command's exec() function is called when the button is clicked and the enabled() method returns true. However, the issue I'm having is that I do not know how to get the new button to appear in a disabled state. I expected the button to appear disabled when the emailReport command's enabled() call returns false, but this is not the case. Am I going about this the right way, or is there a better way to accomplish this?