Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can we get an alert on IWR completion? 2

Status
Not open for further replies.

nagrajm

MIS
Jul 31, 2002
123
IN
Hi Everybody,

Cognos IWR is a very useful tool in getting the users to run their reports off of a web browser. There are many factors affecting the run-time of an impromptu report

- Position in queue
- network contention
- database contention
- User Supplied Prompt etc. etc. etc.

Upon completion, the report is plopped into the users' inbox. However, there is no alert. During this time, the user has to keep refreshing his inbox every now and then to find out if the report is done.

This is actually a very annoying experience for the user and though Cognos is such a beautiful tool, an obvious lack of automatic refresh can be frustrating.

I understand that Series 7 has this issue fixed. However, does anyone know if the IWR inbox screen can be made to automatically refresh at certain intervals in prior versions?

Thanks
 
nagrajm,

Cognos supplied a 'fix' for this a while back. See below:

HTH,

Dave Griffin

IWR 6.0 Tips and Techniques

Automatically loading a report when it is complete

Steps:

In Windows Explorer, navigate to the \Cognos\Cer1\iwr\templates\en directory.
Rename the "timer.html.eng.tmpl" file to something different (for example, timer.html.eng.tmpl_old).
Download "timer.html.eng.tmpl" into this directory.*
Change directories to \Cognos\Cer1\webcontent\iwr\en\images.
Download "anim_query_progress.gif" into this directory.*
Stop and Start the "Impromptu Web Service Manager (Cer1)" NT Service.
* To download, right-click the link, and from the shortcut menu:

A. In Netscape:

Click Save Link As. The Save As dialog box appears.
In the Save as type drop-down list, select All Files (*.*).
Save the file in the location specified above.
B. In Internet Explorer:

Click Save Target As. The Save As dialog box appears.
In the Save as type drop-down list, select All Files.
Save the timer.html.eng.htm file in the location specified above, and then rename it to timer.html.eng.tmpl.


New File timer.html.eng.tmpl (copy and paste to text file):

Code:
begin 666 timer.html.eng.tmpl
M/$A434P^#0H\345402!(5%10+45154E6/2)0PT*?0T*9G5N8W1I;VX@0VAE8VM.;W2X@($ET(&%P<&5A
MPT*#0H@(&quot; @(&quot; @('9A'0@PT*(&quot; @
M(&quot; @(&quot; @(&quot;!T:6UE5F%L=64@/2 B4F5F7!E/2)T97AT(B!N86UE/2)F86-E(B!S='EL93TB
M8F]R9&5R.B!M961I=6T@;F]N92(@<VEZ93TB,S B/CPO<#X-&quot;B @(&quot; \+W1D
M/CPO='(^#0H\+U1!0DQ%/@T*/&9O;G0@9F%C93TB87)I86PB/CQP/@T*/'1A
M8FQE(&)O<F1E<CTP(&-E;&QP861D:6YG/3(@8V5L;'-P86-I;F<],&quot;!W:61T
M:#TV,3 ^#0H\='(^/'1D(&%L:6=N/2)L969T(B!N;W=R87 ^/&9O;G0@9F%C
M93TB07)I86PB(&-O;&]R/2)B;&%C:R(^#0H\+2TC338Z4D5455).5$\M+3X-
M&quot;CPO=&0^/&quot;]T<CX-&quot;CPO=&%B;&4^#0H\24U'(%-20STB+T-O9VYO<R]I=W(O
M96XO:6UA9V5S+V)A;FYE<E]B;W1T;VU?8F%R+F=I9B(@5TE$5$@]-C$P($A%
M24=(5#TT($)/4D1%4CTP(&%L=#TB(CX-&quot;CPO9F]N=#X-&quot;CPO1D]233X-&quot;CPO
M0T5.5$52/@T*/&quot;]&quot;3T19/@T*/$U%5$$@2%144&quot;U%455)5CTB4')A9VUA(B!#
;;VYT96YT/2)N;RUC86-H92(^#0H\+TA434P^
`
end

The Decision Support Group
Reporting Consulting with Cognos BI Tools
&quot;Magic with Data&quot;
[pc2]
 
Hi Dave,

You have omitted to mention the link I should download

&quot;timer.html.eng.tmpl&quot; and
&quot;anim_query_progress.gif&quot; from.

Thanks



 
The code segment is the contents of &quot;timer.html.eng.tmpl&quot;. Just cust and paste it into a text file of the same name.

I'll look for the gif at the Cognos site and see if they have the original timer file there as well. It may be in the supported area. Do you have access there?

Dave Griffin
The Decision Support Group
Reporting Consulting with Cognos BI Tools
&quot;Magic with Data&quot;
[pc2]
 
The link for the timer.html is:


The link for the gif is:


Both require a support id. Let me know if you cannot do this and I'll see what I can do.

HTH,

Dave Griffin
The Decision Support Group
Reporting Consulting with Cognos BI Tools
&quot;Magic with Data&quot;
[pc2]
 
Dave

The code segment that you are asking me to copy and paste into the timer.html.eng.tmpl is a piece of garbage. Please review what you have posted. I have a feeling that you might not have copied the right code segment within the begin...end block.

Even then I tried what you had suggested. Doesn't work.

I have access to Cognos support area. I could not find any documentation on this topic nor anything remotely connected to this topic there.

Let me know if you come up with something.

Thanks
 
nagrajm,

Sorry to hear you are having trouble with the code. It is straight off the Cognos support site. I played with it a little 18 months ago, but we moved on and are now on Series 7, so I can't give you assurances that it will work.

The link to the article (it's a tips & tricks, not a knowledgebase article) is:


You can repeat the search yourself using the Search Box at the top of the support home page with the text &quot;timer.html&quot;.

It does appear that Cognos has changed the contents of the timer.html file that the link points to. What I posted was the contents back in early 2001. The current file has different code.

Again, sorry if you can't make it work, but it Cognos' code, not mine.

Regards,

Dave Griffin
The Decision Support Group
Reporting Consulting with Cognos BI Tools
&quot;Magic with Data&quot;
[pc2]
 
Dave

I have pasted below the code segment that I downloaded from Cognos site. The function showtime() does a timed refresh/reload of the page. The default interval is 10 seconds. However, one can edit the following lines to customize the interval one is comfortable with.

var refreshInterval = 10
if ((now - CurStartTime) > 10 * 1000)

Thanks for pointing me in the right direction.

<HTML>
<META HTTP-EQUIV=&quot;Pragma&quot; Content=&quot;no-cache&quot;>
<HEAD><TITLE>Cognos Impromptu Web Reports - Timer</TITLE></HEAD>
<BODY BGCOLOR=&quot;#ffffff&quot; onLoad=&quot;startclock(); timerONE=window.setTimeout&quot; >
<CENTER>
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--
<--#M1:HELP -->
function StatusHelp() {
}
function CheckNow() {
<--#M2:CHECK -->
/*
If we are drilling through from PowerPlay, Cognos inserts a &quot;Return True&quot;
at the end of the insertion point #M2:CHECK above. So, if we get to here,
we are not in PowerPlay. It appears that if we just run a reload on the
current location, we will check to see if the report is done.
*/
location.reload(true);

}
//-->


/*****************************************************
Functions
*****************************************************/

function stopclock (){

if(timerRunning)

clearTimeout(timerID);

timerRunning = false;

}

function showtime () {

var now = new Date();
var refreshInterval = 10;
var timeValue;
var timeRemain;

eTimeCur = Math.floor((now - CurStartTime) / 1000);

timeRemain = refreshInterval - eTimeCur;

if (timeRemain > 0)
{
timeValue = &quot;Next refresh: &quot; + timeRemain + &quot; seconds&quot;;
}
else
{
timeValue = &quot;Refreshing...&quot;;
}

document.TableWithClock.face.value = timeValue;

// Make interval soft
if ((now - CurStartTime) > 10 * 1000)
{
CheckNow();
/* Stop the clock to let the browser refresh.
This is key for slow connections or
when the server is busy.
*/
stopclock();
return true;
}

timerID = setTimeout(&quot;showtime()&quot;,1000);

timerRunning = true;

}

function startclock () {

// Make sure the clock is stopped

stopclock();

showtime();

}



/********************* Main **************************/

var timerID = null;
var timerRunning = false;
var CurStartTime = new Date();

</SCRIPT>
<FORM name=&quot;TableWithClock&quot; onSubmit=&quot;0&quot;>
<TABLE WIDTH=610 BORDER=0 cellpadding=0 cellspacing=0>
<tr><td valign=&quot;bottom&quot; colspan=3 nowrap><IMG SRC=&quot;/Cognos/iwr/en/images/banner_properties_top.gif&quot; WIDTH=610 HEIGHT=4 BORDER=0 ALT=&quot;&quot;></td></tr>
<tr>
<td align=&quot;left&quot; valign=&quot;top&quot; width=&quot;130&quot; nowrap><font face=&quot;Arial&quot; color=&quot;teal&quot;><B>Report:</B></font></td>
<td align=&quot;left&quot; valign=&quot;top&quot; width=&quot;325&quot; nowrap><font face=&quot;Arial&quot; color=&quot;black&quot;><B>
<--#M3:REPORT -->
</B></font></td>
<td align=&quot;right&quot; valign=&quot;top&quot;><A HREF=&quot;JavaScript:ShowHelp()&quot;><IMG SRC=&quot;/Cognos/iwr/en/images/banner_properties_help.gif&quot; BORDER=0 ALT=&quot;Help&quot;></a></td>
</tr>
</TABLE>
<TABLE border=0 cellpadding=0 cellspacing=0 width=610>
<tr><td width=30% nowrap><font face=&quot;Arial&quot; color=&quot;black&quot;>
<--#M8:STATUS-->
</font></td>
<td align=&quot;left&quot; nowrap><font face=&quot;Arial&quot; color=&quot;black&quot;>
<--#M7:STATE-->
</font></td></tr>
<tr><td nowrap><font face=&quot;Arial&quot; color=&quot;black&quot;>
<--#M9:START-->
</font></td>
<td align=&quot;left&quot; nowrap><font face=&quot;Arial&quot; color=&quot;black&quot;>
<--#M5:EXECSTARTTIME -->
</font></td></tr>
<--#M4:LASTEXECTIME -->
<tr><td nowrap><font face=&quot;Arial&quot; color=&quot;black&quot;> </font></td>
<td align=&quot;left&quot; nowrap><p><input type=&quot;text&quot; name=&quot;face&quot; style=&quot;border: medium none&quot; size=&quot;30&quot;></p>
</td></tr>
</TABLE>
<font face=&quot;arial&quot;><p>
<table border=0 cellpadding=2 cellspacing=0 width=610>
<tr><td align=&quot;left&quot; nowrap><font face=&quot;Arial&quot; color=&quot;black&quot;>
<--#M6:RETURNTO-->
</td></tr>
</table>
<IMG SRC=&quot;/Cognos/iwr/en/images/banner_bottom_bar.gif&quot; WIDTH=610 HEIGHT=4 BORDER=0 alt=&quot;&quot;>
</font>
</FORM>
</CENTER>
</BODY>
<META HTTP-EQUIV=&quot;Pragma&quot; Content=&quot;no-cache&quot;>
</HTML>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top