{"id":26,"date":"2010-04-08T14:38:15","date_gmt":"2010-04-08T19:38:15","guid":{"rendered":"http:\/\/www.cognitiveinfo.com\/?p=26"},"modified":"2010-04-08T14:38:15","modified_gmt":"2010-04-08T19:38:15","slug":"calling-cognos-reports-with-url-parameters-and-removing-headers","status":"publish","type":"post","link":"http:\/\/cognitiveinfo.com\/?p=26","title":{"rendered":"Calling Cognos reports with URL parameters and removing headers"},"content":{"rendered":"<p>When building dashboards with jQuery objects, there may be issues calling the report within the Cognos Portal Pages &#8216;Cognos Viewer&#8217; object. The workaround is to use the &#8216;HTML Viewer&#8217; in a portal page. The HTML Viewer is actually an iFrame calling a new instance of Cognos and may require re-authentication.<\/p>\n<p>The method we ended up for inserting reports is as follows.<\/p>\n<p>1. Create the target report for the dashboard\/portal page.<\/p>\n<p>2. In Cognos Connection, navigate to the report and click on Properties.<\/p>\n<p>3. In the upper right hand corner Click on &#8216;View the search path, ID and URL&#8217;.<\/p>\n<p>4. In the pop-up info window, there is a &#8216;Default action URL&#8217;. Copy the contents of that box to a text editor such as <a href=\"http:\/\/notepad-plus.sourceforge.net\/uk\/site.htm\">Notepad++<\/a>.<\/p>\n<p>Paste it into your text editor and It will be in this format:<\/p>\n<blockquote><p>http:\/\/localhost:80\/cognos84\/cgi-bin\/cognosisapi.dll?b_action=cognosViewer&amp;ui.action=run&amp;ui.object=%2fcontent%2ffolder%5b%40name%3d%27Samples%27%5d%2ffolder%5b%40name%3d%27Models%27%5d%2ffolder%5b%40name%3d%27Interactive%20Samples%27%5d%2freport%5b%40name%3d%27Top%2010%20Retailers%20for%202005%27%5d&amp;ui.name=Top%2010%20Retailers%20for%202005&amp;run.outputFormat=&amp;run.prompt=true<\/p><\/blockquote>\n<p>5. In the text editor<br \/>\nReplace &#8216;b_action=cognosViewer&#8217;<br \/>\nWith &#8216;b_action=xts.run&amp;m=portal\/launch.xts&amp;ui.tool=CognosViewer&#8217;<br \/>\n(remove single &#8216;quotes&#8217;)<\/p>\n<p>6. To remove headers, append the URL with &#8216;&amp;ui=h1h2h3h4&#8217;<br \/>\nSee page 7 of the <a href=\"http:\/\/www.ibm.com\/developerworks\/data\/library\/cognos\/page123.html\">IBM PDF<\/a> for details:<\/p>\n<figure id=\"attachment_37\" aria-describedby=\"caption-attachment-37\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.cognitiveinfo.com\/wp-content\/uploads\/2010\/04\/cognosheaders.jpg\"><img decoding=\"async\" class=\"size-medium wp-image-37\" title=\"Cognos headers\" src=\"http:\/\/www.cognitiveinfo.com\/wp-content\/uploads\/2010\/04\/cognosheaders-300x66.jpg\" alt=\"Cognos headers\" width=\"300\" height=\"66\" \/><\/a><figcaption id=\"caption-attachment-37\" class=\"wp-caption-text\">Cognos header labels used for removal.<\/figcaption><\/figure>\n<p>Completed URL to call report without headers:<\/p>\n<blockquote><p>http:\/\/localhost:80\/cognos84\/cgi-bin\/cognosisapi.dll?b_action=xts.run&amp;m=portal\/launch.xts&amp;ui.tool=CognosViewer&amp;ui.action=run&amp;ui.object=%2fcontent%2ffolder%5b%40name%3d%27Samples%27%5d%2ffolder%5b%40name%3d%27Models%27%5d%2ffolder%5b%40name%3d%27Interactive%20Samples%27%5d%2freport%5b%40name%3d%27Top%2010%20Retailers%20for%202005%27%5d&amp;ui.name=Top%2010%20Retailers%20for%202005&amp;run.outputFormat=&amp;run.prompt=true&amp;ui=h1h2h3h4<\/p><\/blockquote>\n<p>7. Create a portal page with an &#8216;HTML Viewer&#8217;<\/p>\n<p>8. Open the page and edit the HTML Viewer properties.<\/p>\n<p>9. For the &#8216;HTML Content&#8217; paste in your completed URL from above.<\/p>\n<p>10. Save and open the portal page. It should run with jQuery working and not replicate the main portal headers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When building dashboards with jQuery objects, there may be issues calling the report within the Cognos Portal Pages &#8216;Cognos Viewer&#8217; object. The workaround is to use the &#8216;HTML Viewer&#8217; in a portal page. The HTML Viewer is actually an iFrame calling a new instance of Cognos and may require re-authentication. The method we ended up [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":38,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[21,37,77],"class_list":["post-26","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cognos","tag-8-4","tag-cognos","tag-report-studio"],"_links":{"self":[{"href":"http:\/\/cognitiveinfo.com\/index.php?rest_route=\/wp\/v2\/posts\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/cognitiveinfo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/cognitiveinfo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/cognitiveinfo.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/cognitiveinfo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26"}],"version-history":[{"count":0,"href":"http:\/\/cognitiveinfo.com\/index.php?rest_route=\/wp\/v2\/posts\/26\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/cognitiveinfo.com\/index.php?rest_route=\/"}],"wp:attachment":[{"href":"http:\/\/cognitiveinfo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/cognitiveinfo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/cognitiveinfo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}