If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Execute different reports based on prompt values?

Started by mrl72, 29 May 2014 01:15:11 PM

Previous topic - Next topic

mrl72

Hi all -

I have a requirement to provide a prompt page to the user. The page will have two prompts, lets say PromptA and PromptB. If users enters something into PromptA then it will execute ReportA (and pass the value of the prompt to it). Likewise for PromptB. I was wondering if this is possible through a macro on the prompt page, so instead of executing the content of the report when user clicks Finish button, it executes one of two physical reports via URL.

If this is not do-able, then is it possible to have two completely different queries, and it only execute one or the other based upon which prompt has been satisfied?

Cheers.

bi4u2

You have lots of options for this. What I would do is to have 2 prompts pages, the first page might have a prompt that says something like 'Select Report Type' - which could be A or B. This page would have a Next button rather than Finish. The 2nd prompt page would have the 2 different prompt filters that have variables set up to display one or the other based on your selection on the first page. The second prompt page would have the finish button.

navissar

It's like bi4u2 said, there are many ways to achieve this. But before we go into that, I like to take more of a holistic approach when I see a requirement like that: Not just the "How", but also the "Why".
Obviously I don't have your specific requirement details, but from what you have told the user interface you're suggesting isn't very intuitive.
Try to pretend you're a user. You have no idea how the report was developed, and what runs what, nor should you - you have other things on your mind. You have a screen with two prompts and a finish button. How will you be able to tell that putting value in one will run report A and putting value in the other will run report B? What happens if you put a value in both? In none of them?

Sure, you can write a text on screen that will explain the behaviour ("If a value is inserted to prompt A then Report A will run" etc.). However [here starts a rant about texts on screen], a truth that is self evident and bitter is that PEOPLE DO NOT READ TEXT INSTRUCTIONS ON SCREEN EVER. never ever ever ever ever. Robin would beat Superman, Patrick Stewart would speak with a Texas accent, Kim and Kanye would live happily ever after before users start reading on-screen instructions.
I lost count on all the times where users called to me to complain a report isn't running for them just for me to tell them to read the instructions or the error message. I spent ages customizing an error message for when a user doesn't select the right amount of values on a prompt just for the users to call me afterwards. Users would rather pick up the phone, dial a number, wait to be answered, and ask for help than to read lines of letters on screen.
...And the worst part is, they're absolutely right. Your system should cater for them, and web forms nowadays are such an intuitive, common language that no instructions should be required. If I don't need text instructions to buy a book on Amazon or an anti-snore spray on ebay (Wife's a light sleeper) - why would I need instructions for a sales report?
And even if, by some divine intervention,they do read it: They'll only read it ONCE. You have a splat of text litter on your screen that is deemed unnecessary the second it is noticed! I call this phenomena "Objects in the mirror". You know how in some cars, the side mirrors have a writing on them which reads "Objects in the mirror are closer than they appear"? Well, this is a very important warning that you only need if this is the first time you're operating a vehicle, and it's a useless waste of mirror space all the other times. Same goes for on-screen instructions.
[here ends the text on screens rant]

What I would do in your stead is this:
1. A prompt for report name ("Sales Report/Returns Report", for instance).
2. Based on selection is prompt A, show the relevant prompts on screen
3. Run the report.

Anyway, Paul has a nice sample on how to create a link from a prompt page that you can use. It's here: http://cognospaul.com/2014/03/20/passing-parameters-without-refreshing-page/
You can use it as you see fit and I think it's the most efficient way to achieve what you are after.