Solved

ActiveX produces blank page with error when run through certain machines

Posted on 2004-09-14
3
203 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now