Monday 7 May 2012

How to run Active report without saving it

Hi Guys,

What i am looking for is running the active report from public folders by clicking on report name ,However if its a activer report it gives pop up box saying open or save .I do not want this .

Succesfully found solution in non prod environment .The solution does not work in production .If you have installed Cognso on your personal laptop .It will definately work .In production due to security setting it does not work 

A workaround I found. that works in my production(Might not work for you still give it a try)


1. Run the Active Report via Report Studio and get its URL from the browser.
2. Create a new dummy blank report ; Insert an HTML item that will redirect to the Active Report URL.

3) write a java script below in that HTML item to open the active report in same page so it looks like as if the active report is opening directly

<script language="javascript" type="text/javascript">
window.navigate ('your url from browser of report studio run')
</script>

Note . window.navigate will open url in the same page .If you use window.open it will open the URL in a new page .It will give you one blank page and one active report page so better use window.navigate

Now when the user runs the dummy blank report...it gives the effect of running the active report from the web.



Trying for solutoin in actual production environment as above solution wont work

This is your basic home page url

http://localhost/cognos10/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/welcome/welcome.xts


The below is the main thing .Rest are parameters passed on what to do.you can modify them to get your work done

b_action= tells it to open cognosviewer
&ui.action =run
&ui.object =Which object to open that is your report'great_outdoors_sales'
Remember its cognosViewer (Notice upper case V there otherwise it does not work)

Actual URL

http://localhost/cognos10/cgi-bin/cognos.cgi?b_action=cognosViewer&ui.action=run&ui.object=/content/package[@name='GO Sales (analysis)']/interactiveReport[@name='active try']

The request will be rejected by firewall with below error

DPR-ERR-2079 Firewall Security Rejection CAF rejection details are available in the log.

An CAF error is displayed as prohibited characters are being passed on the URI such as single quotes ('). The URI should not include single quote characters. They should be encoded to avoid rejections by XSS filter.

Meaning

Cognos does not like the 'Go sales(analysis)' put there in single quotes need to encode it so that its not rejected

simple and Foolish workaround

Go to cognos configuration .Cognos application Firewall >CAF validation > set to false .This will turn off firewall

not in readable form

The URL that appears in the browser when active report is run is below.Notice that is not in readable form we cant make out what it is?


http://localhost/cognos10/cgi-bin/cognos.cgi?b_action=dc&f=b3V0cHV0MTMzNjQ1MDMwMzA_&k=FAAAADmDsJBUfOMFhpFvzzLV3SiDn-uIcf0QGb2PnicFKirWldTRmRTd6CI_&s=FAAAADmDsJBUfOMFhpFvzzLV3SiDn-uIbLwe7jr36ThFXYQHLmFt7cQuLN8_&did=1&viewer=true


To open as if openining from report studio .Notice teh ui.tool=reportstudio

http://localhost/cognos10/cgi-bin/cognos.cgi?b_action=cognosViewer&ui.tool=reportStudio&ui.action=run&ui.object=/content/package[@name='GO Sales (analysis)']/interactiveReport[@name='active try']


1 comment: