Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Report Viewer Error Message

Status
Not open for further replies.

jmcclain

Programmer
Aug 14, 2002
27
US
I'm trying to determine why an error is occuring on this page.

I've deconstructed my app to a single .asp page where I've hardcoded in some values (e.g. SI_ID...). I got this page straight from the Crystal website.

I'm getting:

CrystalReportViewer
Unspecified error
Failed to view report
error number: -2147467259
error description: Unspecified error


When I run this page. I can successfully open the report in ePortfolio - Help!! Any ideas!!

<%
'===================================================================
' AUTHOR - Shawn Gagnon
' CREATED - October 6, 2003
' PURPOSE - This sample ASP application demonstrates how to view a
' report on demand using the Crystal Enterprise 9 COM SDK.
' DESCRIPTION
' - Define CE Logon Variables
' - Create the Enterprise Session Manager and iStore objects
' - Query the APS for a report to view
' - Create viewer object and view report
'==================================================================

'Declare the APS Logon Variables
Dim APS
Dim Username
Dim Password
Dim Authtype

'Set APS logon credentials - change these to match your particular CE environment
APS = "xxxxx"
Username = "xxxxx"
Password = "xxxxx"
'Authtype = "secEnterprise"
Authtype = "secWindowsNT"

'Declare variables for Enterprise Session
Dim oEnterpriseSessionMgr
Dim ceSession
Dim iStore

'Load the Enterprise Session Manager
Set oEnterpriseSessionMgr = Server.CreateObject("CrystalEnterprise.SessionMgr")

'Logon to the APS and create iStore object
Set ceSession = oEnterpriseSessionMgr.Logon(Username, Password, APS, Authtype)
Set iStore = ceSession.Service("","InfoStore")

'Declare InfoObject Variable
Dim Reports
Dim Report

'Query APS for the report to view
Set Reports = iStore.Query("SELECT SI_ID, SI_NAME FROM CI_INFOOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.Report' and SI_ID = 339531")
Report = Reports.Item(1).Properties("SI_ID")

'Declare the Report App Factory and Report Document Objects
Dim rptAppFactory
Dim reportDocument

'Create the Report App Factory and Report Document Objects
Set rptAppFactory = iStore.EnterpriseSession.Service("","PSReportFactory")
Set reportDocument = rptAppFactory.OpenReportSource(CLng(Report))

'Declare the viewer object variable
Dim Viewer

'Create a viewer object and view the report
Set Viewer = CreateObject("CrystalReports.CrystalReportInteractiveViewer")
With Viewer
.reportSource = reportDocument
.EnterpriseLogon = iStore.EnterpriseSession
End With

'Error handle
on error resume next
Viewer.ProcessHTTPRequest Request, Response, Session

if err.number <> 0 then
response.write "Failed to view report" & "</BR>"
response.write "error number: " & err.number & "</BR>"
response.write "error description: " & err.description
end if
%>
 
As a follow-up - when I take the error handling off I get the following:

webReporting.dll error '80004005'

This leads me to believe this is a problem between the IIS and APS?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top