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

How to make refresh button to work?

Status
Not open for further replies.

accuransx

Programmer
Sep 23, 2000
62
0
0
MY
I've managed to make visible the refresh button on CR9 InteractiveViewer but unable to use it...any code missing?
FYI, these are my modified version of the InteractiveViewer.asp :


<%@ Language=VBScript CodePage=65001 ENABLESESSIONSTATE = False %>
<% Option Explicit
' Note - the CodePage=65001 is needed to display Unicode text correctly in the viewer
' if Session is null for ProcessHttpRequest
Dim objectFactory
Set objectFactory = CreateObject(&quot;CrystalReports.ObjectFactory.2&quot;)

Response.ExpiresAbsolute = Now() - 1

Dim viewer


Set viewer = objectFactory.CreateObject(&quot;CrystalReports.CrystalReportInteractiveViewer&quot;)
viewer.Name = &quot;page&quot;
viewer.IsOwnForm = true
viewer.IsOwnPage = true

viewer.HasRefreshButton = true '<--- I did this!!! but failed to function


Dim theReportName
theReportName = Request.Form(&quot;ReportName&quot;)
if theReportName = &quot;&quot; then theReportName = Request.QueryString(&quot;ReportName&quot;)
viewer.URI = &quot;interactiveViewer.asp?ReportName=&quot; + Server.URLEncode(theReportName)

Dim clientDoc
Set clientDoc = objectFactory.CreateObject(&quot;CrystalClientDoc.ReportClientDocument&quot;)
clientDoc.Open theReportName
viewer.ReportSource = clientDoc.ReportSource

Dim BooleanSearchControl
Set BooleanSearchControl = objectFactory.CreateObject(&quot;CrystalReports.BooleanSearchControl&quot;)
BooleanSearchControl.ReportDocument = clientDoc
viewer.BooleanSearchControl = BooleanSearchControl
viewer.ProcessHttpRequest Request, Response, Null
' ReportClientDocument will be automatically closed when clientDoc is released
%>

I GOT THESE ERROR MSG WHEN CLICK ON THE REFRESH BUTTON ON THE CR9 Viewer toolbar :

Technical Information (for support personnel)

Error Type:
Microsoft VBScript runtime (0x800A01FB)
An exception occurred: 'ProcessHttpRequest'
/rassamples/en/asp/rPortfolio/HTMLViewers/interactiveViewer.asp, line 35


Browser Type:
Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

Page:
POST 1706 bytes to /rassamples/en/asp/rPortfolio/HTMLViewers/interactiveViewer.asp

POST Data:
__CrystalEventTarget=page&__CrystalEventArgument=tb%3Drefresh&__CrystalCompositeViewState=pageCrystalForm%3Dxsi%253Atype%253D%2522CrystalReports.PropertyBag%2522%2520version%253D%25222%2522%253E%253CP . . .

Anybody, pls help.

 
I am also getting very similar error. I am able to display refresh button but unfortunately it does not work as in regular report.
Can someone please help me??
I would also like to know how NOT to show &quot;Group Tree&quot; at the first opening of report.

Thanks,
Rupesh.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top