Now avaible on the Accelerator Catalogue is a dashboard widget extension to add URL-based web link buttons to your dashboards. You can access it here:
For Cognos Analytis 11.2.0 and above or
For Cognos Analytics 11.1.7The widget itself is simple to use. In this article I'll give you some tips to help you get the most out of it. You will need to have at least Cognos Analytics 11.1.7 FP2 installed to make use of it.
FEBRUARY 3rd, 2021 UPDATE: A new version has been posted with some enhancements! If you've installed the previous version, please head over to the Accelerator Catalogue and download the the latest.
MARCH 9th 2021 UPDATE: Another new version has been posted with support for opening reports, dashboards and changing tabs. If you've installed the previous version, please update it with the latest from the Accelerator Catalogue.
Getting Started
First of all, you need to find the widget. After the extensin has been installed (and you may need to logout/log back in) you will see
Link Widget available in the
Custom Widgets panel when you're editing a dashboard. Like this:
Just click on
Link Widget and it will get added to the current tab of your dashboard. Like any dashboard widget, you can resize it and move it around. The default link type is URL. It won't look like much until you open the Properties panel and fill in the
Link to field. Just type a URL (including the https://) into this field, and now you've got a working link on your dashboard! The link will open in a new browser tab/window, unless you deselect the
Open in new window toggle.
HINT: When your dashboard is in
Edit mode (sometimes called Authoring mode) the link will not be clickable and will look dimmed. This is so that you can easily resize and reposition it on the canvas. Once you switch out of Edit mode (sometimes called Consumption mode), the link will be active.
Customizations
Let's start making the link look a little fancier. The most obvious thing is to customize the text that shows, rather that just having the raw URL displayed. That's what the
Label field is for. You still just have a plain-looking text link, which may be completely appropriate in many use cases. But if you'd like to quickly make it look spiffier, use the
Styles drop-down property to choose from one of the available built-in styles. For example, to make it a blue rectangular button that matches the IBM Carbon X theme of Cognos, select
Primary as the style. Here's what the other built-in styles look like:
But if the none of these built-in styles are exactly right for you, don't worry because you can make the links look however you want them to look using the
Custom CSS field. You use this field to apply any CSS you want to to the widget. For example, let's say you wanted to keep the basic style, but you wanted the text to be bigger and also to be purple. Just enter the following text into the
Custom CSS field:
font-size: 24px; color: purple
You can also add custom styling to any of the built-in styles. For example, you can use the
Primary style, but make the text centered, and the background red:
justify-content: center; background-color: red; padding: 0;
Those are simple example, but the sky is the limit. Switch back to
None as your style and get as creative as you like with the
Custom CSS and have it match up with the rest of your dashboard:
color: white; border-radius: 15px; background: linear-gradient(0deg, rgba(34,193,195,1) 0%, rgba(253,187,45,1) 100%); border: 3px solid #2c7a75; display: flex; align-items: center; justify-content: center; box-sizing: border-box; font-size: 20px; font-weight: bold; box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
Opening Dashboards and Reports, and Changing Tabs
You can do more than just open web pages. You can also open other Cognos dashboards and reports! This will work just like if you opened the asset manually, and you'll be able to use the switcher to move back and forth between your other assets including the original dashboard.
To link to a dashboard or report, simply change the Link type and then use the ID of the asset into the Link to field. You can still apply all the same label and styling options to these kinds of links.
The ID can be found by opening up the properties of the report or dashboard from the content navigation, and then looking at its advanced properties. Simply copy the ID field from here to the Link to field in the Link dashboard widget.
Having links that change tabs is even easier. Just select Tab Index in the Link Type field, and enter the index number of the tab you want the link to switch to. The index starts at 0. So if you have a button that you want to have switch to the 3rd tab on your dashboard, use an index value of 2.
We hope you enjoy this dashboard widget and please post examples of how you're using it to our community discussions!
#CognosAnalyticswithWatson