Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle ASP
|
Oracle ASP Using ASP with Oracle databases. For Oracle discussions not specific to ASP, please see the Oracle forum. For more ASP discussions, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 15th, 2004, 04:02 PM
Authorized User
 
Join Date: Dec 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default Oracle 9i, ASPConnection for Crystal Reports 9 ?

Hi,

I am working on a ASP Web Application for crystal reports 9, the database is oracle 9i. I have set up the DSN for the remote oracle server using the microsoft ODBC driver for oracle, and am able to run the crystal reports from the crystal wizard. But when I call the report in my ASP it gives an error saying Logon Failed Details:01000:[Microsoft][ODBC Driver Manager]The driver doesn't support version of ODBC behaviour that the application requested (see SQLSetEnvAttr).

How do I define a connection in my ASP page for this purpose?
Do I have to define some code in global.asa?
 
Old December 21st, 2004, 07:29 PM
Authorized User
 
Join Date: Dec 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is the working solution I was able to find but am still not able to view the report in the viewer. i.e. When the asp page opens the asp page opens I see a grey browser with a small pic at the top left corner of the report. This code is supported by crystal reports 9 and Oracle 9i
<%
'Create the Application object
If Not IsObject(session("oApp")) Then
 Set session("oApp") =Server.CreateObject("CrystalRuntime.Application.9 ")
End If
'Create Report Object
reportname = "C:\ReportDesignASP\SimpleSetLogonInfo\rptTest1.rp t"
If IsObject(session("oRpt")) then
 Set session("oRpt") = nothing
End If
Set session("oRpt") = session("oApp").OpenReport(reportname,1)
'Disable error prompts on webserver
session("oRpt").EnableParameterPrompting = False
'Log On to report database connection
'Creat a tables collection
Set crTableCollection = Session("oRpt").Database.Tables
'Loop through the tables and assign log on info
For Each crTable in crTableCollection
crtable.ConnectionProperties.Item("DSN") = "DSN"
crtable.ConnectionProperties.Item("User ID") = "xxxxxx"
crtable.ConnectionProperties.Item("Password") = "xxxxxxx"
if not crtable.TestConnectivity then
    response.write "Warning: Unable to connect to data source using the following information.<BR><BR>"
    response.write "Server / ODBC data source: " & crtable.ConnectionProperties.Item("DSN") & "<BR>"
    response.write "Database / Table: " & crtable.ConnectionProperties.Item("Database") & "<BR>"
    response.write "User Name: " & crtable.ConnectionProperties.Item("User ID") & "<BR>"
    response.write "Please verify the database user password in this ASP file.<BR><BR>"
end if
Next

session("oRpt").DiscardSavedData
On Error Resume Next
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
%>
 
Old January 20th, 2005, 11:30 PM
Authorized User
 
Join Date: Dec 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Go to the following link to find more examples for publishing crystal reports 9 using ASP
http://support.businessobjects.com/c...pxmps9.exe.asp





Similar Threads
Thread Thread Starter Forum Replies Last Post
Migration of crystal reports from oracle to DB2 ggnanaraj Crystal Reports 1 February 6th, 2007 12:09 AM
Installation of Oracle 9i sreechand_b Oracle 4 September 13th, 2005 08:10 AM
Convert Crystal reports from Access to Oracle atakhan Pro VB Databases 2 July 4th, 2004 01:33 AM
crystal reports in .net using Oracle bvrao Crystal Reports 3 November 12th, 2003 12:31 AM
Oracle 9i OCI knguyen Oracle 0 August 12th, 2003 07:29 PM





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