Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 13th, 2005, 10:29 PM
Registered User
 
Join Date: Jan 2005
Location: , , Indonesia.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to koecrit
Default Call Crystal Report 10 in ASP

Hello,

I have developed a few crystal reports now I have write an ASP( I am new ro ASP) Application which uses the activeXViewer for displaying the report to the client. I have seen some code samples on the web (From www.businessobjects.com) and tried using the following code but i just get white blank display monitor, there's no data there, but i don't get any error message..This condition made me confused. Can anyone help me out with this its very urgent.

im using crystal report 10, my browser is IE.6 ... is there i've to set in my browser ??
Can anyone help me out with this its very urgent.

Thanks

The Code I am trying to use is

1. SimplePreviewReport.asp

<%@ LANGUAGE="VBSCRIPT" %>

<%
reportname = "SimplePreviewReport.rpt"
%>





2. AlwaysRequiredSteps.asp

<%
If Not IsObject (session("oApp")) Then
  Set session("oApp") = Server.CreateObject("CrystalRuntime.Application.10 ")
End If

Path = Request.ServerVariables("PATH_TRANSLATED")
While (Right(Path, 1) <> "\" And Len(Path) <> 0)
iLen = Len(Path) - 1
Path = Left(Path, iLen)
Wend

If IsObject(session("oRpt")) then
    Set session("oRpt") = nothing
End if

On error resume next

Set session("oRpt") = session("oApp").OpenReport(path & reportname, 1)

If Err.Number <> 0 Then
  Response.Write "Error Occurred creating Report Object: " & Err.Description
  Set Session("oRpt") = nothing
  Set Session("oApp") = nothing
  Session.Abandon
  Response.End
End If

session("oRpt").MorePrintEngineErrorMessages = False
session("oRpt").EnableParameterPrompting = False
'session("oRpt").DiscardSavedData
%>

3. MoreRequiredSteps.asp

<%
session("oRpt").ReadRecords

If Err.Number <> 0 Then
  Response.Write "Error Occurred Reading Records: " & Err.Description
  Set Session("oRpt") = nothing
  Set Session("oApp") = nothing
  Session.Abandon
  Response.End
Else
  If IsObject(session("oPageEngine")) Then
      set session("oPageEngine") = nothing
  End If
  set session("oPageEngine") = session("oRpt").PageEngine
End If
%>

4. SmartViewerActiveX.asp

<HTML>
<HEAD>
<TITLE>Crystal Reports ActiveX Viewer</TITLE>
</HEAD>
<BODY BGCOLOR=C6C6C6 ONUNLOAD="CallDestroy();" leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0>
<OBJECT ID="CRViewer"
    CLASSID="CLSID:A1B8A30B-8AAA-4a3e-8869-1DA509E8A011"
    WIDTH=100% HEIGHT=99%
    CODEBASE="/crystalreportviewers10/ActiveXControls/ActiveXViewer.cab#Version=10,0,0,280" VIEWASTEXT>
<PARAM NAME="EnableRefreshButton" VALUE=1>
<PARAM NAME="EnableGroupTree" VALUE=1>
<PARAM NAME="DisplayGroupTree" VALUE=1>
<PARAM NAME="EnablePrintButton" VALUE=1>
<PARAM NAME="EnableExportButton" VALUE=1>
<PARAM NAME="EnableDrillDown" VALUE=1>
<PARAM NAME="EnableSearchControl" VALUE=1>
<PARAM NAME="EnableAnimationControl" VALUE=1>
<PARAM NAME="EnableZoomControl" VALUE=1>
</OBJECT>

<SCRIPT LANGUAGE="VBScript">
<!--
Sub Window_Onload
    On Error Resume Next
    Dim webBroker
    Set webBroker = CreateObject("CrystalReports10.WebReportBroker.1")
    if ScriptEngineMajorVersion < 2 then
        window.alert "IE 3.02 users on NT4 need to get the latest version of VBScript or install IE 4.01 SP1. IE 3.02 users on Win95 need DCOM95 and latest version of VBScript, or install IE 4.01 SP1. These files are available at Microsoft's web site."
    else
        Dim webSource
        Set webSource = CreateObject("CrystalReports10.WebReportSource.1")
        webSource.ReportSource = webBroker
        webSource.URL = "RDCrptserver10.asp"
        webSource.PromptOnRefresh = True
        CRViewer.ReportSource = webSource
    end if
    CRViewer.ViewReport
End Sub
-->
</SCRIPT>

<script language="javascript">
function CallDestroy()
{
    window.open("Cleanup.asp");
}
</script>

</BODY>
</HTML>


Reply With Quote
  #2 (permalink)  
Old January 24th, 2007, 06:27 AM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi...i have the same problem too, with a Crystal Report 11
Have you found any solutions.
Thanks
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Call Crystal report 10.0.0.533 in ASP murtu123 Classic ASP Professional 0 June 22nd, 2007 07:39 AM
ASP.NET Crystal Report 10.2 jayamohan4u ASP.NET 2.0 Basics 0 February 13th, 2007 07:20 AM
call crystal 10 thru ASP santwan Pro VB 6 0 December 16th, 2005 03:18 AM
Crystal Report ver.10 with ASP.NET alrazapk@gmail.com Classic ASP Basics 0 November 6th, 2004 01:32 AM
ASP & Crystal Report 10 samik_tanik Classic ASP Basics 1 August 20th, 2004 12:27 AM



All times are GMT -4. The time now is 02:14 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.