on 2011 Jun 17 3:52 PM
I am new to both, ASP and Crystal Report, please keep that in mind while replying.
The goal is to use classic ASP to design a webpage through which invoke crystal report, pass parameters, run CR get report and display it in the PDF format.
So I downloaded trial version, for time being, and started learning ASP and CR. While browsing through this forum, I found a code which is supposed to help me in this. I downloaded and tweaked a little, but it is not working. The code is same copied in many forums, people claiming that it is working, but not for me.
The code is divided in various files. Here it goes.
SimpleReportViewer.asp - this is the file called first in browser
<%@ LANGUAGE="VBSCRIPT" %>
<%
reportname = "SimplePreviewReport.rpt"
%>
<!-- #include file="AlwaysRequiredSteps.asp" -->
<!-- #include file="MoreRequiredSteps.asp" -->
<!-- #include file="SmartViewerActiveX.asp" -->
Now here is the file - AlwaysRequiredSteps.asp
If Not IsObject (session("oApp")) Then
Set session("oApp") = Server.CreateObject("CrystalReports14.ObjectFactory.1")
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
I am not typing in more code, as the error I am getting is in code above.
Now when I execute this code in IE, the error I am getting is
"Error Occurred creating Report Object: Object doesn't support this property or method"
Please help, any kind of help in getting this running will greatly appreciated
Well, when I go to Help -> About Crystal Reports, I see following there
Copyright Notice and other blah blah blah
SAP Business Objects
CR Developer
Version 14.0.0.760 RTM
Product Type: Evaluation. Expires in 22 days.
Number of licenses: 1
So looks like I got version 14.
Please advise.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Crystal Reports 2011 does not come with an SDK.
Also the COM SDK was retired after version XI R2 so it is not available with CR 2008 or 2011.
You will need to move to either Java or .NET.
If you want to use .NET you will need to use CR for VS.NET 2010 or CRJ 2.10 for Java.
Jason
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Let's start with:
"So I downloaded trial version,..."
What version of CR? As far as I know only CR 2008 is available at this time as a trial version download. And that is where your problems start.
In order for you to code Classic ASP with CR, you must use the Report Designer Component (RDC). RDC has been retired in CR 2008. Last version of CR to include the RDC was CR XI R2 (11.5). Patch support for CR XI R2 terminated about a year ago and any support terminates June 30 of this year. E.g.; RDC and thus Classic ASP is not the way to go.
I would highly recommend going to an SDK (CR SDK for .NET or Java) that will be supported for years to come - particularly if you are creating a brand new solution.
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
65 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.