Wrox Programmer Forums
|
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 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 19th, 2006, 10:53 AM
Registered User
 
Join Date: Dec 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Server.CreateObject Failed Crystal Report V 8.0



Hi all,


I am using one of the examples for asp pages, I had already unregister and register back the Comm dll's.: This is the code:


<%@ LANGUAGE="VBSCRIPT" %>
<title>Crystal Reports ASP Example - Using Stored Procedure Parameters</title>
<%
'================================================= =============================
' WORKING WITH THE REPORT DESIGNER COMPONENT AND ASP TO USE STORED PROCEDURES
' AND PASS VALUES TO STORED PROCEDURE PARAMETERS
'================================================= =============================
'
' CONCEPT
' The Application object (oApp) is needed so that we can create the
' report object.
' Once we have created the report object (oRpt), we can then
' gain access to such things the "DatabaseParameters" in that
' report.
'
' ALWAYS REQUIRED STEPS (contained in AlwaysRequiredSteps.asp)
' - create the application object
' - create the report object
' - open the report
'
' WORK WITH STORED PROCEDURE PARAMETERS
' - get the database in the report
' - get the database's Stored Procedure Parameters
' - get the specific Store Procedure Parameter
' - save the new value to the Stored Proc Param
'
' MORE ALWAYS REQUIRED STEPS
' - retrieve the records
' - create the page engine
'
' DISPLAY THE REPORT
' - display the report using a smart viewer
' = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =



'================================================= =================
'================================================= =================
' ALWAYS REQUIRED STEPS
'
' Include the file AlwaysRequiredSteps.asp which contains the code
' for steps:
' - create the application object
' - create the report object and open the report

%>

<%
' This is the name of the report being used in this example.
' This variable is being used in the AlwaysRequiredSteps.asp
' To use a different report, change it here.

reportname = "SimpleStoredProcParam.rpt"

%>

<%
' If it is easier to understand, simply delete the line above,
' and replace it with the entire contents of the file
' AlwaysRequiredSteps.asp
'================================================= =================
'================================================= =================
' LOG ONTO THE EXAMPLES SYTEM DSN AGAINST MS SQL SERVER "PUBS" SAMPLE DATABASE

userid = "xx"
Password= "none"

session("oRpt").MorePrintEngineErrorMessages = False
session("oRpt").EnableParameterPrompting = False

set crtable = session("oRpt").Database.Tables.Item(1)
crtable.SetLogonInfo "Automation", "pubs", cstr(userid),cstr(Password)


'================================================= =================
'================================================= =================
' WORK WITH STORED PROCEDURE PARAMETERS

' - get the database's Stored Procedure Parameters
' Create a variable and point it to the Stored Procedure Parameter
' in the report

set StoredProcParamCollection = Session("oRpt").ParameterFields


' - get the specific Store Procedure Parameter
' Create a variable and point it to the specific stored procedure
' that we want to work on

Set ThisParam = StoredProcParamCollection.item(1)
Set ThisParam2 = StoredProcParamCollection.item(2)
Set ThisParam3 = StoredProcParamCollection.item(3)

' - save the new value to the Stored Proc Param
' Create a variable and store the new value for the Stored Procedure
' in it

NewParamValue = "10"
NewParamValue2 = "50"
NewParamValue3 = ("'"&a&"'")

' Save the new value for the Stored Procedure in the Store Procedure

ThisParam.SetCurrentValue cint(NewParamValue), 7
ThisParam2.SetCurrentValue cint(NewParamValue2), 7
ThisParam3.SetCurrentValue cstr(NewParamValue3), 12




'================================================= =================
'================================================= =================
'
' MORE ALWAYS REQUIRED STEPS
' - retrieve the records
' - create the page engine
' - create the smart viewer and point it to rptserver.asp
'
%>



<%
' If it is easier to understand, simply delete the line above,
' and replace it with the entire contents of the file
' MoreRequiredSteps.asp
'================================================= =================
'================================================= =================

' INSTANTIATE THE REPORT VIEWER
'
'When using the Crystal Reports in an ASP environment, we use
'the same page-on-demand Report Viewers used with the Crystal Web Component Server.
'There are six Report Viewers:
'
'1. Report Viewer for ActiveX
'2. Report Viewer for Java using Browser JVM
'3. Report Viewer for Standard HTML with Frames
'4. Report Viewer for Standard HTML
'5. Report Viewer for Java Using Java Plugin
'6. Report Viewer for Netscape Plug-in (ActiveX)
'
'The Report Viewer that you use will based on the browser's display capablities.
'For Example, you would not want to instantiate one of the Java viewers if the browser
'did not support Java applets. For purposes on this demo, we have chosen to
'define a viewer. You can through code determine the support capabilities of
'the requesting browser. However that functionality is inherent in the Crystal
'Reports RDC and is beyond the scope of this demonstration app.
'
'We have chosen to leverage the server side include functionality of ASP
'for simplicity sake. So you can use the SmartViewer*.asp files to instantiate
'the smart viewer that you wish to send to the browser. Simply replace the line
'below with the Smart Viewer asp file you wish to use.
'
'The choices are SmartViewerActiveX.asp, SmartViewerJava.asp, JavaPluginViewer.asp,
'ActiveXPluginViewer.asp. SmartViewerHTMLFrame.asp, and SmartViewerHTMLPAge.asp.
'Note that to use this include you must have the appropriate .asp file in the
'same virtual directory as the main ASP page.
'
'*NOTE* For SmartViewerHTMLFrame and SmartViewerHTMLPage, you must also have
'the files framepage.asp and toolbar.asp in your virtual directory.


'================================================= ============================
' DISPLAY THE REPORT
' - display the report using a smart viewer
'
' Include one of the Smart Viewers.
' - Report Viewer for ActiveX = SmartViewerActiveX.asp
' - Report Viewer for Java using Browser JVM = SmartViewerJAVA.asp
' - Report Viewer for Standard HTML = SmartViewerHTMLPage.asp
' - Report Viewer for Standard HTML w/ Frames = SmartViewerHTMLFrame.asp
' - Report Viewer for Java Using Java Plugin = JavaPluginViewer.asp
' - Report Viewer for Netscape Plug-in = ActiveXPluginViewer.asp
'================================================= ============================


Response.Redirect("http://localhost/laptv/intermediate/SimpleStoredProcParam.rpt") %>


<%

'================================================= =================
' If it easier for you to conceptualize this code by seeing it all
' contained in a single file, simply delete the line above, and
' replace it with the entire contents of the file being included.
'================================================= =================

%>

 I am still getting this error

Server object error 'ASP 0177 : 800401f3' Server.CreateObject Failed
http://myserver/myreport.asp, line 22
Invalid ProgID.

help please!!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Report "Login Failed" windows 2000 server HaniShtine Crystal Reports 0 December 7th, 2005 04:00 PM
Crystal Report Logon failed mrleaps ASP.NET 1.0 and 1.1 Professional 1 October 13th, 2005 01:06 PM
Server.CreateObject Failed patwadd Classic ASP Databases 3 February 7th, 2005 05:46 PM
Server.CreateObject Failed ckwizard77 Classic ASP Components 2 October 23rd, 2004 09:41 AM
Crystal 8.5: Failed to Export Report clairewates Crystal Reports 0 October 6th, 2004 10:48 AM





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