CognosPaul’s Bag o’ Tricks!

CognosPaul’s Bag o’ Tricks!

Back in August I presented at BACon on the extensions that I wrote for PMsquare, and now I’m very happy to announce that we’re giving them away for free! We actually started giving them away for free at the conference, but I’ve been a bit too lazy busy to actually get around to writing this.

First you might ask, what are extensions? As I wrote about in a previous article extensions allow you to modify the UI, adding or removing features as you like. One of the best things about adding new features is using the internal JavaScript API in Report Studio, making it do what you want it to do instead of what IBM wants it to do.

One of the features of that article was an early version of the Clipboard Editor. The basic structure is there, but it’s been improved immensely since. My good friend Michael Hoggard and I worked on it to add a new feature, and to clean it up a little.

changes in clipboard editor

But that’s not all! I’ve also added another new and awesome feature. One of my biggest issues with building reports is testing out different prompt scenarios. We could run the report and manually set each prompt, but that can be incredibly time consuming. You could force Cognos to prompt you, by validating or by clicking on “view generated SQL/MDX” but that’s clunky. You also can’t view the currently set parameters, and if you want to change anything you have to clear the parameter values and start again.

To get around this clunky interface, I’ve decided to write my own. I’m very proud to present the aptly named “Parameter Editor”!

parameter editor

This interface allows you to add, remove, and change session level parameters in the report. What this means is you can now see what scenario you’re running the report in, without having to go through the tedious process of running the report, selecting the prompts, and rerunning. But that’s not all! When running in interactive mode, you an also use it to see exactly what parameters were sent through a drillthrough. When previewing a report, you can also play with the parameters. See what happens when you change them from one scenario to another. In the below animation I’m testing several different scenarios, where one fails for some reason!

Param editor

As you can see you can set both the display and use values. The plus button allows you to add multiple values for each parameter. If both boxes are empty, the script ignores it and doesn’t set a value for the parameter. If only one of the boxes is empty, it will use the value from the other box.

These are session level parameters as opposed to report level. It’s an important distinction. The parameters are set on the report development session only – they aren’t saved with the report.

I do have additional tools that I’m planning on adding to it. Data Modules present a host of opportunity. I feel there is a lot of room for improvement in the UI, especially when it comes to quickly editing multiple items.

And finally, you can download this extension from the PMsquare website here: https://pmsquare.com/freebies