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

Output Format as prompt option

Started by mgvpai, 12 Jan 2015 06:28:07 AM

Previous topic - Next topic

mgvpai

I have requirement that while running the report need to provide prompt for selecting the output format. If users select PDF and click the finish button report need to run in PDF format. This report also containd Date prompt, value prompt and text box prompt. Along with these prompt need to provide one more prompt which is output select prompt. I have used Java script in HTML item. but issue in this script is once ouput format is selected if click anywhere outside the prompt page report will run. I need your help to resolve this issue.

mgvpai

I have requirement that while running the report need to provide prompt for selecting the output format. example if users select PDF and click the finish button report need to run in PDF format. This report also contains Date prompt, value prompt and text box prompt, along with these prompt need to provide one more prompt which is output select prompt. I need your help to resolve this issue.

Michael75


Lynn


Lynn

Please review the forum etiquette and item 4 in particular. You posted this topic twice. Members may spend time responding to something that has already been solved in a duplicate post. Please be respectful of the time people spend here by not double posting.

http://www.cognoise.com/index.php/topic,26856.0.html

mgvpai

First one I have in a wrong group (Cognos BI) so I have not got the response for 1 day. So I thought this might be put under Report Studio. Please regret the incovinience caused.

mgvpai

Thanks for thr replay, I have used this code but if I choose PDF and click some where in prompt not necessarly Finish button report will run. Could you please help me to resolve this iisue.

mgvpai

Thanks Michael75 for you response and valuable input. In my requirement I have different prompts in a prompt page and need to keep this output format prompt in the same prompt page. Could you please help me to reolve this.

Michael75

Well, I wouldn't know how to do this from the prompt page, but I can suggest another approach. Let's say your report is called "Daily Sales" and you want to give the users the options of PDF and Excel as well as the default HTML.

Create two report views "Daily Sales (PDF)" and "Daily Sales (Excel)". For each view, in Properties - Report view - Report options, check "Override the default values" and specify the appropriate format.

Would this be acceptable to your users?

mgvpai

This approach is not feasible. Users are running report from portal page and while running they want choose output format. any suggestions to achieve this would be highly appriciated.

BigChris

You'd probably need to do something fiddly with some javascript to do that...I think there's anything out of the box to do it. CognosPaul has some very clever stuff on his website...might be worth looking on there www.cognospaul.com

Alternatively, work out which is the most used format and set the default to be that. Then explain to the user how to get the report in a different format...it's not hard to do!

mgvpai

Thank You for your suggestions.

MFGF

Quote from: Lynn on 13 Jan 2015 08:18:27 AM
Please review the forum etiquette and item 4 in particular. You posted this topic twice. Members may spend time responding to something that has already been solved in a duplicate post. Please be respectful of the time people spend here by not double posting.

http://www.cognoise.com/index.php/topic,26856.0.html

I have used my magic moderator powers to merge both topics into this thread. All is now right with the world :)

MF.
Meep!

Michael75

@ MF
Magic powers indeed  :)

@ mgvpai
You wrote:
QuoteUsers are running report from portal page...

What exactly do you mean by this? Are you referring to the Cognos Connection portal, or are you running this report embedded in some non-Cognos portal?

cognos810

Hello mgvpai,
I have a solution without the javascript, not sure if its an option for you, but here it is.
1)Use 3 finish buttons(assuming you want to provide HTML,PDF and Excel as output options), with a Text item dropped on it.
2)Click on the text item in the button, and define a drill-through on each. In the drill-through definitions call the same report. The only difference in the drill through definitions should be the Output format. Make sure, you have UNchecked the "Open in New Window" check box in the drill through definition.
3)Next create a render variable using the parameter value selected in the output prompt box. Make it auto-submit and render the correct Finish button based on it. Example: If user selects PDF, the Drill through button with PDF format specified in its drill-through defintion should be rendered.

Would it work?

-Cognos810

mgvpai

Thank you for you suggestions. I will try for this.

Regarding Portal Page: We have created portal page in Cognos and linked this report in this page. Users are using this page to run their report.

sunny bachan prasad

Hi Cognos810,
I have the same requirements and tried your suggestion its working fine.
Thanks everyone for their time and suggestion

Wangd

Hello mgvpai,
I just found your post several years ago on this topic.  You solution using the Finish button sounds simple.  I was trying to following your step and got lost in the last one. Is it possible for you to provide the detailed steps how to create the Render Variable? I tried but get an error.

Thanks!
Deanna

dougp

Cognos810's solution may have worked in Cognos 10, but in Cognos 11.0.13 there's a lot of wierdness.

I don't want the user to need to click the "finish" button twice, so I used steps 1 and 2 of Cognos810's solution.  In the drill through definition, I set the Display prompt pages: property to Only when required parameter values are missing.

What I did:
I created a simple report from the Sales (Query) package.
Added Country, Year, and [sales] Quantity to a list.
Created optional filters and optional prompts for Country and Year.
Added the prompt buttons as described by steps 1 and 2 from Cognos810.

What I see:
(Unless otherwise noted, "run" means click the run button, then select the appropriate finish button)
Run the report to HTML, selecting parameter values.  (Austria)
  It works.  (but flashes the output on the screen once before calming down)
Run it to HTML again, selecting different parameter values.  (France)
  The new parameter values (France) are used to produce an output, which immediately disappears and is replaced with the old output.  (Austria)
Run it to PDF, selecting different parameter values. (Germany)
  The new parameter values (Germany) are used to produce an HTML output, which is quickly replaced by PDF output of my first run.  (Austria)
Run it to Excel, selecting different parameter values.  (United States)
  The new parameter values (United States) are used to produce an HTML output.  An error message is displayed (_19B is not a constructor).
(out of curiosity) Use the Cognos Run button to run it to Excel (without using the finish buttons).
  I get Excel output for my first selection (Austria)

If I add a Reprompt button to the prompt page, and click it before I click the Finish button, I get the right data -- but I still get the flashyflashy.  And the Excel option still produces the error (but I get the right output when I use the Cognos tools to run to Excel.


While Cognos being buggy in this way is disappointing (but in no way surprising)...

What confuses me about this thread:
Is it really that difficult to show the user where the run buttons are?  This seems like a lot of work to provide the same functionality in some non-standard way.

Wangd

Thank you for your post.
I wish I could expose the Run buttons to the users, but our Report Studio is embedded into another system.  User don't see the Report Studio Run buttons.

I am following your and Cognos810 steps, but am still stuck at how I can render the correct Finish button.

Here are what I did:
1. Added 2 Finish buttons. 
2. Drop a text item in the button and define a drill-through on each.  Each drill-through calls the same report with one to run as PDF and one to run as Excel.
3. Uncheck 'Open in New Window".
4. Created a Value prompt with two static choices: PDF, Excel.  If I make it auto-submit, I will get an error.
5. Created a String variable with two values, PDF, Excel.
6. Click the text items and render the String variable, one is PDF and the other Excel.  (This is where I am stuck.  I think it should somehow render the Finish button, but there isn't a Render Variable for the Finish button. 

Thanks in advance for your advice.
Deanna

dougp

Did some more research and found that hyperlinks on the Finish buttons may be an option.  Tried to paste my resulting code here, but the security rules don't allow it.

Bottom line:  You should probably use JavaScript.

Wangd

I have a version that is using java scripts.  It is working.  The problem is that I can't put the output format prompt at the same page as the other prompts such as dates.  So I have to use a separate page for the output format prompt.  That page has only one item on it with the Next button only.  It doesn't look good and the users have to click Next to go to the 2nd prompt page for the other required prompts.  That's why I think the solutions in this thread might help me accomplish what I need. 
Do you have any idea how to do that?

Thanks!
Deanna

Francis aka khayman

i think it is more inconvenient to choose the output format in the prompts rather than choose one of the available views that will render the report in the desired format. but i understand... users....