Solved

ActiveX produces blank page with error when run through certain machines

Posted on 2004-09-14
3
207 Views
Last Modified: 2008-02-01
I am have an issue with certain computers that are not liking the ActiveX viewer the following is the code I use after the report call. What  happens is on 97% of my machines eveything works great but on the remaining computers it does not start the crviewer_downloadstarted
is bypasses and leaves me with a blank page. I have removed all dll and reinstalled the viewer with no luck. Any suggestions would be geratly appreciated.
Thanks
Jim


<%
'
%>
<HTML>
<HEAD>
<TITLE>Crystal Reports ActiveX Viewer</TITLE>
</HEAD>
<BODY BGCOLOR=C6C6C6 topmargin=0 leftmargin=0>

<OBJECT ID="CRViewer1"
    CLASSID="CLSID:A1B8A30B-8AAA-4A3E-8869-1DA509E8A011"
    WIDTH=100% HEIGHT=99%
    CODEBASE="/crystalreportviewers10/activeXcontrols/activexviewer.cab#Version=10,0,5,598" VIEWASTEXT>
<PARAM NAME="EnableRefreshButton" VALUE=0>
<PARAM NAME="EnableGroupTree" VALUE=0>
<PARAM NAME="DisplayGroupTree" VALUE=0>
<PARAM NAME="EnablePrintButton" VALUE=1>
<PARAM NAME="EnableExportButton" VALUE=0>
<PARAM NAME="EnableDrillDown" VALUE=0>
<PARAM NAME="EnableSearchControl" VALUE=0>
<PARAM NAME="EnableAnimationControl" VALUE=0>
<PARAM NAME="EnableZoomControl" VALUE=0>
<PARAM NAME="EnableSelectExpertButton" VALUE=0>
</OBJECT>

<SCRIPT LANGUAGE="VBScript">
<!--
dim timer
dim printerTimer
dim pageOne
PageOne = True
window.alert "begin"

****** this is where is does not start the download


Sub CRViewer1_DownloadStarted(byval downloadType)
if downloadType = 1 and PageOne then
PageOne = False
window.alert "begin"


timer = window.settimeout("OnMyTimeIn",1000)
window.alert "started"
'window.status = "downloadfinished"
end if
end sub

Sub window_onLoad()
Page_Initialize()
End Sub



Sub Page_Initialize
      On Error Resume Next
      Dim webBroker
      Set webBroker = CreateObject("WebReportBroker.WebReportBroker")
            if err.number <> 0 then
            window.alert "_LOC_The Crystal ActiveX Viewer is unable to create its resource                   objects_ENDLOC_."

                             ***It also gives an error here


            else
            Dim webSource
            Set webSource = CreateObject("WebReportSource.WebReportSource")
            webSource.ReportSource = webBroker
            webSource.URL = "rptserver.asp"
            webSource.PromptOnRefresh = True
            CRViewer.ReportSource = webSource
            end if

            crviewer.viewreport
      
      
End Sub

Sub CRViewer1_DownloadFinished(byval downloadType)
if downloadType = 1 and PageOne then
PageOne = False
timer = window.settimeout("OnMyTimeOut",1000)
window.alert "DownloadFinished"
window.status = "downloadfinished"
end if
end sub


Sub OnMyTimeIn()
if not CRViewer1.IsBusy then
window.ClearTimeout(timer)
window.alert "My timein"
CRViewer1.PrintReport
printerTimer = window.SetTimeOut("OnPrinterTimeOut", 1000)
end if
end sub


Sub OnMyTimeOut()
if not CRViewer1.IsBusy then
window.ClearTimeout(timer)
window.alert "My timeout"

CRViewer1.PrintReport
printerTimer = window.SetTimeOut("OnPrinterTimeOut", 1000)
end if
end sub

Sub OnPrinterTimeOut()
'window.alert "OnPrinterTimeout"

if not CRViewer1.IsBusy then
window.ClearTimeOut(printerTimer)
'window.History.Back
window.status = "done"
end if
end sub
-->
</SCRIPT>




</BODY>
</HTML>
0
Comment
Question by:jrgustin
3 Comments
 

Author Comment

by:jrgustin
ID: 12191056
I have answered this question through Crystals help. What was wrong here for anyone who wanted to know was that since we were upgrading to crystal 10 from 8.5 , it was still callin gthe Crystal 8.5 webbroker.Redoing this section
Sub Page_Initialize
     On Error Resume Next
     Dim webBroker
     Set webBroker = CreateObject("WebReportBroker10.WebReportBroker")
          if err.number <> 0 then
          window.alert "_LOC_The Crystal ActiveX Viewer is unable to create its resource                objects_ENDLOC_."

                             ***It also gives an error here


          else
          Dim webSource
          Set webSource = CreateObject("WebReportSource10.WebReportSource")
0
 
LVL 1

Accepted Solution

by:
GhostMod earned 0 total points
ID: 12313168
PAQed, with points refunded (500)

GhostMod
Community Support Moderator
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question