Linking Down in Documents
For as much fun as it is to develop solutions in MicroStrategy, it’s that much more fun to find creative solutions for problems you aren’t supposed to be able to solve out of the box. The Discussion Forum‘s first Guru, AndreasK, once said (paraphrasing because I couldn’t find the link), “I never like to say it can’t be done, because someone always seems to find a way“. Such is the case for today’s trick. A question was posted to the forum earlier this year asking if it was possible to build a link that would jump down a long scrolling document to a lower, specified location. My immediate response to the post was, “I don’t think you can do that“. It’s funny, because I remember typing, “You can’t do that“, but AndreasK’s words came to mind and I rephrased it to be a little non-committal. Eventually of course, a group of members did come to a solution that I even use in a few Documents myself. It’s a cool trick, and a good example of never giving up when it looks like something isn’t possible, because the solution is so simple and obvious.
As mentioned in the opening, this wasn’t my solution (I was skeptical it could be accomplished), so complete credit goes to Dilruba who both asked the question and solved the issue with some suggestions from the community. The original forum post can be found here.
In my implementation of this trick, we have a few different Alerts Dashboards. These are run by users when a separate email is sent out telling them that various conditions in the data were met that they’d decided warrant their attention. The reports have a summary section at the top that includes a list of 10 or so alerts and the number of times they’ve occurred, and then sections for each alert as you scroll down the page that list out the details. Depending on the number of alerts for the given types, and despite using Grid Paging for the display, it’s still a long report with lots of scrolling. While we were working on an early version of this report, I ran across the aforementioned forum post and decided that the solution would work well in this context.
The user could click on the Alert type in the summary section and instantly zoom down the page to the section that contained the details (and then back up again with a link to the Summary section). This added a little bit more interactivity and some easier navigation for a long scrolling report.
The concept we’re using here is the HTML technique of linking to other parts of the same web page by referencing an anchor tag prefaced by a # sign. Since MicroStrategy 9.0 introduced a new object for Documents called the HTML Container, this provided the tools to do this job.
Step 1 – Create the Anchor
Add an HTML Container to the Document to hold the place that you want the jump to occur to, and use the code:
<a name="Bookmark">Title 1 - Bookmark</a>
Step 2 – Create the Link
Add another HTML Container to the Document that will serve as the place you’ll be clicking from.
<a href=#Bookmark>Click To Go To Title 1 - Bookmark</a>
That’s it! A simple, yet powerful solution to implement a feature that otherwise isn’t possible out of the box.