Solved

ActiveX produces blank page with error when run through certain machines

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video discusses moving either the default database or any database to a new volume.

759 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

22 Experts available now in Live!

Get 1:1 Help Now