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

Choose report output on prompt page

Started by wbarry123, 11 Nov 2010 01:56:27 PM

Previous topic - Next topic

wbarry123

Report Studio 8.3
I am wanting to allow a consumer to choose the output of their report from a prompt page.  I am using the following script in a HTML item.  When I run the report it appears that the script is resetting the prompts already chosen.  Is there something I am doing wrong?

<html>
<head>
<script language="javascript">
function gotoUrl()
{
var obj=document.all['OutputFormat'];
window.onload(gCognosViewer.getRV().viewReport(obj.options[obj.selectedIndex].value));
}

</script>
</head>
<body>

<select name="OutputFormat" OnBlur="javascript:gotoUrl()">
<option value="HTML">HTML</option>
<option value="PDF">PDF</option>
<option value="spreadsheetML">Excel 2007</option>
<option value="singleXLS">Excel 2000 Single Sheet</option>
<option value="XLWA">Excel 2002</option>
<option value="XLS">Excel 2000</option>
<option value="CSV">Delimited text (CSV)</option>
<option value="XML">XML</option>
</select>

</body>
</html>

wbarry123

If I create a seperate prompt page, place the HTML item on the new page and place the page first teh report works perfectly.  I want to have it on the main prompt page though (if possible).

bvk.cognoise

hi  ,



1st step:-
>create a report with any data items
eg:product line,product type,revenue
>save that report

2nd step:-
>open saved report
>go to page explorer,create new prompt page
>from insertable objects pane drag a text item into prompt page,enter text  as 'PDF' in that text item
>Drag another text item into that same  prompt page enter text as 'HTML' in that tex item
>do the same process to all formats like excel,csv,xml  etc......

3rd step
>then right click on first text item 'PDF' then click on drillthrough Defination
>drill through window will open
>click on new new drill through button in drill through window.
>under  target  tab
>click on report then select saved report(means the report which you saved  in 1st step) click ok
>under actions  change action to  'run report'
>under format change format to 'PDF' .click ok
>next again go to prompt page ,right click on 'HTML' text item click on drill through defination
>drill through window will open
>click on new new drill through button in drill through window.
>under  target  tab
>click on report then select saved report(means the report which you saved  in 1st step) click ok
>under actions  change action to  'run report'
>under format change format to 'HTML' .click ok
>repeat  same process to all Excel,csv,xml,html  text items  which you created before in prompt page.
>but  under  format change format to respected text items.


eg::       for excel dat item     ----- change  format  to 'excel'
              for to xml dat item   -----  change format to ' xml'
              for to csv dat item    -----  change format to  'csv'

it is very easy method.no need to use java or HTML.hope u understand
Regards
BVK

barrysaab

Boy! Cognos getting on to me!!!