on 02-24-2009 9:05 AM
Hello!
I have an error "Error Occurred creating Report Object: ActiveX component can't create object" when open asp-file in IE. Please, help me! What Java-components I need install? What else?
Server side: Windows 2003 SP2, IIS6, Crystal Reports Server XI
Client side: Windows XP SP3, IE 7.0
thanx to myself and my collegues
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's server-side invocation. Nothing to do with Java.
What code is causing this error?
Sincerely,
Ted Ueda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<%@ LANGUAGE="VBSCRIPT" %>
<%
ServerName="app4-odusb-bur"
DatabaseName="CKReports"
WorkLogin="***"
WorkPWD="***"
reportname = "SV3in1_p1.rpt"
If Not IsObject (session("oApp")) Then
Set session("oApp") = Server.CreateObject("CrystalRuntime.Application.11")
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
rYear = Request.Form("rYear")
rDay = Request.Form("rDay")
rMonth = Request.Form("rMonth")
sDay = CStr(rDay)
if CInt(rDay)<10 then sDay="0"+SDay
sMonth = CStr(rMonth)
if CInt(rMonth)<10 then sMonth="0"+sMonth
sYear = CStr(rYear)
Set obj = CreateObject("ReportServer.Collector") 'HERE an ERROR was occurred, so I have closed any other operators after this one, except Error Message Operators
'obj.ConnectToDatabase1 ServerName, DatabaseName, WorkLogin, WorkPWD
'obj.Disconnect
'Set session("oRpt") = session("oApp").OpenReport(path & reportname, 1)
'Session("oRpt").Database.LogOnServer "p2ssql.dll", CStr(ServerName), CStr(DatabaseName), CStr(WorkLogin), CStr(WorkPWD)
'For n = 1 to Session("oRpt").Database.Tables.Count
' Session("oRpt").Database.Tables.Item(n).SetLogonInfo CStr(ServerName), CStr(DatabaseName), CStr(WorkLogin), CStr(WorkPWD)
'Next
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
...
%>
Hello, Тed!
Thnak you for answer. And, I decide to download a sample application to "Display a report in an ASP page using the RDC" from https://www.sdn.sap.com/irj/boc/samples?rid=/webcontent/uuid/a01c839a-7787-2b10-88a2-c8c7b894df9e [original link is broken], which demonstrates how to use the Report Designer Component (RDC) to preview a report.
But makihg all steps in readme.txt I've got in IE blank screen. I think some Business Objects ActiveX components didn't execute. May be it depends on IIS settings?
Sincerely,
Andrey Kirpichnikov
Hi Andrey,
It's likely your DB logon info. Not sure what sample you are using but your original code specifies the native MS SQL driver: "p2ssql.dll"
This driver has not been supported since Microsoft no longer supports native connectivity since CR 8.5. You have to use OLE DB or ODBC to connect to your MS SQL Server.
Update your reports to use OLE DB or ODBC and then change your code to use the database property bag using logonServerEx and then use .Location method to update your DB info in the report, if it's different than what your report was designed against. If you have VB then use it's Object Browser to look in craxdrt.dll for various log on methods and what we need to connect. Newer samples should have examples on how to use it also.
Thank you
Don
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.