Hello Cognos Lovers,
thank you for so many replies to my small question
Just wanted to share our solutions around QS usage / problems.
Using actual Chrome/Firefox/Edge version works well for us with CA11.1.5+7+11.2 so far. Being supported or not.
These are the problems and solutions we found to our issues:
Problem 1: Opening QS in new PortalSolution 1: via Link as stated in this discussion works. We have been using this since 2004 :-) works like a charme.
Solution 2: Force the Opening of IE in a compatible mode via http headers ... did so for the last 4 month. Last week this stopped working as MFA-authentication page opens in Edge and the OIDC callback Url is opened in Edge, but then directing to Cognos IE opens, which is forced and we receive session mismatch between Edge + IE. Ugly. So removed this from the setup.
Problem 2: Clicking on a QueryStudio report in Public Folder opens ClassicViewer which does not permit editing of filtersSolution 1: Extension of "..." menu add "Run with QueryStudio" as button and hitting that button call the before mentioned URL. Not nice because default action, when clicking on a Querystudio Report still opens the ClassicViewer
Solution 2: Rewrite rule to force opening in QueryStudio instead of ClassicViewer
Here is the RewriteRule for Apache/IHS:
RewriteCond %{HTTP_REFERER} (crn[^\/]).+classicviewer.+id=(?:XSSSTART)?(.[^&]+)(?=XSSEND) [NC]
RewriteRule ^/(crn[^\/]+)/bi/v1/disp$ https://%{HTTP_HOST}/$1/cgi-bin/cognos.cgi/bi/v1/disp?b_action=xts.run&backURL=disp\%3Fb_action\%3Dxts.run\%26m\%3Dportal\%2Fclose.xts\%26ui.compid\%3Dps&m=portal/launch.xts&ui.tool=QueryStudio&ui.object=storeID(\%22%2\%22)&ui.action=edit&ui.gateway=/$1/bi/v1/disp&launch.launchinWindow=true [NE,R=301,L]
Problem 3: QS iFrame height is not properly scaled in chrome/edge. This is a confirmed problem in chrome.Solution: insert some javascript into layout.js file to execute, when ever the iFrame needs resizing.
/** -------------------------------------------------------------- AMVARA ADD ON --------------------------- **/
/** -------------------------------------------------------------- AMVARA ADD ON --------------------------- **/
/** -------------------------------------------------------------- AMVARA ADD ON --------------------------- **/
/**
* AMVARA resizeFrame function to set the correct size in iFrame for QS usage
* Changelog:
* 2021-03-01 RRO created
*/
function resizeFrame(timeoutVal=500) {
console.log("AMVARA trying to set new height")
// Try getting the iFrame height ... this is just for information.
var elm_targetIFrame = null
try {
elm_targetIFrame = window.parent.document.getElementById("reportIFrame").style.height
} catch {
console.log("AMVARA: we could catch this error ... will do so later")
}
// Now we check if height can be set
if (typeof(elm_targetIFrame) != 'undefined' && elm_targetIFrame != null)
{
// See if there is a reportFrame ... it's height defines the iFrame height to be set
var AMVARA_height=window.parent.document.getElementById("reportFrame").scrollHeight-50
console.log("AMVARA iFrameHeight:", AMVARA_height)
// Exists.
console.log("AMVARA windowElement with iFrame exists")
window.parent.document.getElementById("reportIFrame").style.height=AMVARA_height+"px"
console.log("AMVARA windowElement set height to ", AMVARA_height)
} else if ( AMVARA_globaleResizeCounter<AMVARA_ResizeThresholdCounter) {
// iFrame is not there yet ... we should wait a little if retry counter has not been reached
// Add +1 to counter
AMVARA_globaleResizeCounter++;
console.log("AMVARA globalCounter: ", AMVARA_globaleResizeCounter)
// set a timeout and max retries
AMVARA_resizeTimeout = setTimeout(function() {
console.log("AMVARA timeoutResize: ", timeoutVal)
resizeFrame(timeoutVal+timeoutVal);
}, timeoutVal )
}
// Just for information
console.log("<====")
return
}
/** AMVARA_resizeTimeout is the window.setTimeout result */
var AMVARA_resizeTimeout = null
/** AMVARA_globaleResizeCounter is a counter to understand howmany times we have looked for the iFrame */
var AMVARA_globaleResizeCounter=1
/** AMVARA_ResizeThresholdCounter is the threshold where we would like to stop looking for iFrame */
var AMVARA_ResizeThresholdCounter=10
/** resize the iFrame */
resizeFrame(500)
/** when window is resized, we would probably also resize the iFrame to something nice */
window.addEventListener('resize', resizeFrame)
window.addEventListener('onload', resizeFrame)
console.log("AMVARA resizing events enabled")
/** -------------------------------------------------------------- AMVARA END --------------------------- **/
/** -------------------------------------------------------------- AMVARA END --------------------------- **/
/** -------------------------------------------------------------- AMVARA END --------------------------- **/
Hope this helps :-) And thanks again for your feedback on the topic.
Regards, Ralf
------------------------------
Ralf Roeber
https://linkedin.com/in/ralf-roeber-470425a/------------------------------
Original Message:
Sent: Tue February 23, 2021 10:18 AM
From: Ralf Roeber
Subject: [QUERYSTUDIO] Cognos Portal prevents starting QS with Microsoft Edge Chromium v88 & Chrome v88
Dear Cognosgurus,
we still have some 1.500 QS Users on one of our installation. The cognos portal prevents using QS when browsing with Chrome v88.
It opens the viewer instead of QS and converts reports to Reportstudio reports.
Is there a way to force the Cognos Portal to open QS instead of viewer and converting?
Any hint is appreciated.
------------------------------
Ralf Roeber
https://linkedin.com/in/ralf-roeber-470425a/
------------------------------
#CognosAnalyticswithWatson