Hacking JavaScript libraries (jQuery, Prototype, D3.js et al) into the MicroStrategy Web interface is pretty easy (Bryan describes a couple of ways to do it here), but there’s a third way, that leverages some built-in MicroStrategy functionality, and allows you to easily execute code when the external libraries are asynchronously loaded.

It’s an area that the formal documentation doesn’t cover (yet), but buried in this presentation from Las Vegas 2014 is a handy JavaScript function. It’s only available in Express mode, but if you’re customising a document in this manner, you’re almost certainly planning on restricting the functionality to this mode.

Adding a fragment like that to an HTML Container on your Report Services document will load an external script (or a number of scripts, as the function takes an array), and then call the function you specify once they’ve loaded. It’s an ideal workflow if you need to load a library, and then immediately use it to customise the appearance of the document.

Update: I’ve created a simple plugin to facilitate the sort of selective loading I describe in this post.