INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Calling CR Viewer from our application

Calling CR Viewer from our application

(OP)
For over 13 years ( using Crystal 6 through 11.5)we have called the viewer through an ActiveX call using this code and now it is something no longer available to CR2008 > . We still create the report fine but can no longer call the browser to open the rpt with the active x. Anyone no what we need to do to get this working. I am having a difficult time figuring it out since this is most likely a call to a web folder.

<%@ Language=VBScript CodePage=65001 %>

<%

session("rname")=trim(request("rname"))

reportName = "../xreports/" & trim(request("rname"))


Set objFactory = CreateObject("CrystalReports.ObjectFactory")
    

Dim path, iLen
path = Request.ServerVariables("PATH_TRANSLATED")                     
While (Right(path, 1) <> "\" And Len(path) <> 0)                      
iLen = Len(path) - 1                                                  
path = Left(path, iLen)                                               
Wend       
                                                                                                                                                                                   
' Create a new ReportClientDocument object
Set Session("oClientDoc") = objFactory.CreateObject("CrystalClientDoc.ReportClientDocument")

' Specify the RAS Server (computer name or IP address) to use (If SDK and RAS Service are running on seperate machines)
Session("oClientDoc").ReportAppServer = "localhost"

' Open the report object to initialize the ReportClientDocument
Session("oClientDoc").Open path & reportName


Response.Redirect "activexv.asp"



%>

this is my activexv.asp code


%
' Copyright © 2004 Eatec Corporation
'

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

<OBJECT ID="CRViewer"
    CLASSID="CLSID:6F0892F7-0D44-41C3-BF07-7599873FAA04"
    WIDTH=100% HEIGHT=100%
    CODEBASE="/crystalreportviewers115/activeXcontrols/activexviewer.cab#Version=11,5,3,438" 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

Sub Window_Onload
    On Error Resume Next
    Dim webBroker
    Set webBroker = CreateObject("CrystalReports115.WebReportBroker.1")
    If ScriptEngineMajorVersion < 2 Then
        window.alert "IE 3.02 users need to get the latest version of VBScript or install IE 4.01 SP1 or newer. Users of Windows 95 additionally need DCOM95.  These files are available at Microsoft's web site."
    else
        Dim webSource
        Set webSource = CreateObject("CrystalReports115.WebReportSource.1")
        webSource.ReportSource = webBroker
        webSource.URL = "rptserver.asp"
        webSource.PromptOnRefresh = True
        CRViewer.ReportSource = webSource
    End If
    CRViewer.ViewReport
End Sub




Sub CRViewer_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 OnMyTimeOut()
if not CRViewer.IsBusy then
window.ClearTimeout(timer)
'window.alert "My timeout"
CRViewer.PrintReport
printerTimer = window.SetTimeOut("OnPrinterTimeOut", 10000)
end if
end sub

Sub OnPrinterTimeOut()
'window.alert "OnPrinterTimeout"

if not CRViewer.IsBusy then
window.ClearTimeOut(printerTimer)
'window.History.Back
window.status = "done"
end if
end sub
-->
</SCRIPT>
<script language="javascript">
function CallDestroy()
{
    window.open("Cleanup.asp");
}
</script>




<div>
<!-- This empty div prevents IE from showing a bunch of empty space for the controls above. -->
</div>
<!-- <% = "<p align=""center""><br><br><br><img src=""http://Eatechq8.eatec.com/images/rlogo.gif"" alt=""Eatec"" WIDTH=""246"" HEIGHT=""112""><p align=""center""><b>Report " & trim(request("rname")) & " printing</b>" %> -->
</BODY>
</HTML>



 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close