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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cache problem with ASP pages and crystal - Please Very Urgent

Status
Not open for further replies.

MisterMo

Programmer
Mar 18, 2002
564
GB
How to refresh reports from web pages


I have a asp page that pass parameter values to my reporting page to generate Crystal reports.

Everithing works just fine but when the user return the previous page, and choose another value to view

the reports with the new parameter.
The reporting page only show a GREY area. when I resize the Browser page (Internet Explorer)

This is the Page Code
*******************************************************************
<%@ Language=VBScript %>
<HTML>

<HEAD>
<TITLE>report page</TITLE>
<body bgColor=#BDBDFB>
</HEAD>
<%

Dim myRec
dim myVal
dim myVal2
myRec = Request.QueryString(&quot;rsFound&quot;)
MyVal=left(myRec,(len(myRec)-2))
%>
<p align='center'>

<applet code=com.seagatesoftware.img.ReportViewer.ReportViewer

codebase=&quot;../../../viewer/JavaViewer/&quot; id=ReportViewer width=90% height=80% ><PARAM

NAME=ReportName value=&quot;
<PARAM NAME=ReportTitles value=&quot;Conflict Search&quot;>
<PARAM NAME=ReportParameter value=&quot;user0=live&password0=live&prompt0=<%=myVal%>&quot;>
<PARAM NAME=HasGroupTree VALUE=&quot;FALSE&quot;>
<PARAM NAME=HasRefreshButton VALUE=&quot;TRUE&quot;>
<PARAM NAME=ShowGroupTree VALUE=&quot;FALSE&quot;>
<PARAM NAME=HasPrintButton VALUE=&quot;TRUE&quot;>
<PARAM NAME=HasExportButton VALUE=&quot;TRUE&quot;>
<PARAM NAME=HasTextSearchControls VALUE=&quot;FALSE&quot;>
<PARAM NAME=CanDrillDown VALUE=&quot;true&quot;>
<PARAM NAME=PromptOnRefresh VALUE=&quot;FALSE&quot;>
<PARAM NAME=HasZoomControl VALUE=&quot;TRUE&quot;>
<param name=cabbase value=&quot;/viewer/JavaViewer/ReportViewer.cab&quot;>
</applet></p>

</BODY>
</HTML>

*********************************************************

Can anyone help me Please.

Thank you in advance
MisterMO
MisterMo
Maurizio.urbano@ntlworld.com
Mob. (UK)07719071384
 
At the top of the page set the &quot;Response.Expires&quot; property to 0. This will force the browser to ask for a fresh page each time the server is accessed.

Hope this helps !

Webwzrd
 
Or try to open the report in a new page without toolbar.
So each time when the user clicks on another paramter the other page (containing the report) will reload.

Regards,
Durug
 
This are the one that I have found on Tek-Tips and that didn't work. I Believe that the problem is with Crystal Web Engine.

If I put the code in a form with the submit button it works fine, but that would mean that the user will have to click twice and that is exactly what I don’t want to do

<FORM target='mainFrame' ACTION=' METHOD='post' id=form2 name=form2>
<p align=&quot;center&quot;> click this button to view the report </p>
<p align=&quot;center&quot;><input type=submit value=&quot;<%=stval2%>&quot; id=submit1 name=submit1></p>
<input type=hidden name=&quot;user0&quot; value=&quot;live&quot;></p>
<input type=hidden name=&quot;password0&quot; value=&quot;live&quot;>
<input type=hidden name=&quot;prompt0&quot; value=&quot;<%=stval2%>&quot;>
<input type=hidden name=&quot;init&quot; value=&quot;actx&quot;>
<input type=hidden name=&quot;promptOnRefresh&quot; value=&quot;0&quot;>
</FORM>

=====================================================

I have also tried to do refresh page from the server without much success.

Is there any way that I could trigger the form to auto submit whitout having to click the button.

ASP code to Refresh Pages
************************************************************
(1)

<%
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = &quot;private&quot;
%>
************************************************************
(2)

<script language=vbscript>
x = int(rnd(100000)*100000)
Document.Write &quot;<a href= & x & &quot;>My Link</a>&quot;
</script>
************************************************************
(3)

<META http-EQUIV=&quot;REFRESH&quot; Content=&quot;60&quot;>
<%
Response.Expires = -1000
%>
************************************************************
(4)

<META HTTP-EQUIV=&quot;Pragma&quot; CONTENT=&quot;no-cache&quot;>
************************************************************
(5)

ThisForm.grdPayables.Refresh()
************************************************************ MisterMo
Maurizio.urbano@ntlworld.com
Mob. (UK)07719071384
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top