Solved

ActiveX produces blank page with error when run through certain machines

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

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. …
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

770 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