Solved

ActiveX produces blank page with error when run through certain machines

Posted on 2004-09-14
3
209 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

738 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