Hi. I'm testing the use of Crystal Reports Server XIR2 with an in-house web application (on Server A), and have run into an error message regarding requests for successful report instances from the Crystal Management Server. The application has been written so that when a user requests a report for a given output type (PDF, Word or Excel), an instance of that report (for that output type) is scheduled to run immediately. The user is redirected to a different web page which queries the CMS (on Server B) every 10 seconds for the instance and its current run status. Once the status of the instance is noted as "completed" or "successful", the page then attempts to retrieve the instance and copy it to its local file system. This process is successful when run from the development environment (Server A) which has a Windows XP Professional OS; however, the process is unsuccessful when the application is deployed on a Windows 2000 Server OS (Server C). The instance is created when a report request is made and runs successfully, but when attempting to retrieve the instance and copy it to the local file system on that Win 2K Server machine, the following error occurs: "File Repository Server Output is Down". (At the end of this message is code presenting what is being attempted.)
We have confirmed that the Output File Repository Server service in the Central Configuration Manager is both running and enabled (actually, ALL services are enabled and running). Crystal Reports Server XIR2 is installed fully on Server B (which has a Windows 2003 Server - Enterprise Edition OS), and all services are being run using the Local System Account, which has proper NTFS access to the Filestore\output directory(ies) used by the CMS. Both the server hosting our web application (Server A) and the server running CRServer XIR2 (Server B) exist on the same internal network, and communication between the two servers is wide open (i.e., no Firewall rules in place preventing them from freely communicating). Does anyone have any ideas concerning what might be causing the failure on the output side of the process? Thanks.
Code Example (All proper variable declarations have been made previously) - [VB.NET / VS.NET 2002 - .NET Framework 1.0]:
ceSession = CType(Session.Item("ceSession"), EnterpriseSession)
ceEnterpriseService = ceSession.GetService("", "InfoStore")
ceInfoStore = New InfoStore(ceEnterpriseService)
' Query for the report instance
strSQL = "SELECT * FROM CI_INFOOBJECTS WHERE SI_ID=" & strRptID
ceReportObjects = ceInfoStore.Query(strSQL)
If ceReportObjects.Count > 0 Then
' Examine the status of the report instance
Try
ceReportObject = ceReportObjects.Item(1)
Select Case ceReportObject.SchedulingInfo.Status
Case CeScheduleStatus.ceStatusSuccess : blnCompleted = True
Case Else : blnCompleted = False
End Select
If blnCompleted Then
' Proceed with presenting the report instance to the user
Try
' Determine the instance type to determine next steps
strType = ceReportObject.Properties("SI_PROGID").ToString
Select Case strType
Case "CrystalEnterprise.Pdf"
' Create the object corresponding to the instance
Dim cePlugin As Pdf = New Pdf(ceReportObject.PluginInterface)
' Copy the file to the proper ExportedFiles location
cePlugin.Files(1).CopyTo(CObj(**insert location here**))
' Open the PDF file to the browser
Response.ClearContent()
Response.ClearHeaders()
Response.Clear()
Response.ContentType = "application/pdf"
Response.WriteFile(**insert location here**)
Response.Flush()
Response.Close()
' Delete the file immediately from the file system
System.IO.File.Delete(FName)
Case "CrystalEnterprise.Excel"
' Create the object corresponding to the instance
Dim cePlugin As Excel = New Excel(ceReportObject.PluginInterface)
' Copy the file to the proper ExportedFiles location
cePlugin.Files(1).CopyTo(CObj(FName))
Case "CrystalEnterprise.Word"
' Create the object corresponding to the instance
Dim cePlugin As Word = New Word(ceReportObject.PluginInterface)
' Copy the file to the proper ExportedFiles location
cePlugin.Files(1).CopyTo(CObj(FName))
End Select
' Finally, remove the instance from the CMS repository (for cleanup)
Dim ceRptObjs As InfoObjects
Dim ceRptObj As InfoObject
strSQL = "SELECT * FROM CI_INFOOBJECTS WHERE SI_ID=" & strRptID & " AND SI_INSTANCE=1"
ceRptObjs = ceInfoStore.Query(strSQL)
If ceRptObjs.Count > 0 Then
ceRptObj = ceRptObjs.Item(1)
ceRptObjs.Delete(ceRptObj)
ceInfoStore.Commit(ceRptObjs)
End If
' Final object disposal
If Not ceRptObjs Is Nothing Then ceRptObjs.Dispose()
If Not ceRptObj Is Nothing Then ceRptObj.Dispose()
If Not ceInfoStore Is Nothing Then ceInfoStore.Dispose()
If Not ceSession Is Nothing Then ceSession.Dispose()
If Not ceEnterpriseService Is Nothing Then ceEnterpriseService = Nothing
Catch ex As Exception
Response.Write(vbCrLf & "Error: " & ex.Message.ToString)
Response.Write("-" & ex.StackTrace)
Response.Write(ex.Source)
End Try
-- Creator of the XModuleSB Application: --
We have confirmed that the Output File Repository Server service in the Central Configuration Manager is both running and enabled (actually, ALL services are enabled and running). Crystal Reports Server XIR2 is installed fully on Server B (which has a Windows 2003 Server - Enterprise Edition OS), and all services are being run using the Local System Account, which has proper NTFS access to the Filestore\output directory(ies) used by the CMS. Both the server hosting our web application (Server A) and the server running CRServer XIR2 (Server B) exist on the same internal network, and communication between the two servers is wide open (i.e., no Firewall rules in place preventing them from freely communicating). Does anyone have any ideas concerning what might be causing the failure on the output side of the process? Thanks.
Code Example (All proper variable declarations have been made previously) - [VB.NET / VS.NET 2002 - .NET Framework 1.0]:
ceSession = CType(Session.Item("ceSession"), EnterpriseSession)
ceEnterpriseService = ceSession.GetService("", "InfoStore")
ceInfoStore = New InfoStore(ceEnterpriseService)
' Query for the report instance
strSQL = "SELECT * FROM CI_INFOOBJECTS WHERE SI_ID=" & strRptID
ceReportObjects = ceInfoStore.Query(strSQL)
If ceReportObjects.Count > 0 Then
' Examine the status of the report instance
Try
ceReportObject = ceReportObjects.Item(1)
Select Case ceReportObject.SchedulingInfo.Status
Case CeScheduleStatus.ceStatusSuccess : blnCompleted = True
Case Else : blnCompleted = False
End Select
If blnCompleted Then
' Proceed with presenting the report instance to the user
Try
' Determine the instance type to determine next steps
strType = ceReportObject.Properties("SI_PROGID").ToString
Select Case strType
Case "CrystalEnterprise.Pdf"
' Create the object corresponding to the instance
Dim cePlugin As Pdf = New Pdf(ceReportObject.PluginInterface)
' Copy the file to the proper ExportedFiles location
cePlugin.Files(1).CopyTo(CObj(**insert location here**))
' Open the PDF file to the browser
Response.ClearContent()
Response.ClearHeaders()
Response.Clear()
Response.ContentType = "application/pdf"
Response.WriteFile(**insert location here**)
Response.Flush()
Response.Close()
' Delete the file immediately from the file system
System.IO.File.Delete(FName)
Case "CrystalEnterprise.Excel"
' Create the object corresponding to the instance
Dim cePlugin As Excel = New Excel(ceReportObject.PluginInterface)
' Copy the file to the proper ExportedFiles location
cePlugin.Files(1).CopyTo(CObj(FName))
Case "CrystalEnterprise.Word"
' Create the object corresponding to the instance
Dim cePlugin As Word = New Word(ceReportObject.PluginInterface)
' Copy the file to the proper ExportedFiles location
cePlugin.Files(1).CopyTo(CObj(FName))
End Select
' Finally, remove the instance from the CMS repository (for cleanup)
Dim ceRptObjs As InfoObjects
Dim ceRptObj As InfoObject
strSQL = "SELECT * FROM CI_INFOOBJECTS WHERE SI_ID=" & strRptID & " AND SI_INSTANCE=1"
ceRptObjs = ceInfoStore.Query(strSQL)
If ceRptObjs.Count > 0 Then
ceRptObj = ceRptObjs.Item(1)
ceRptObjs.Delete(ceRptObj)
ceInfoStore.Commit(ceRptObjs)
End If
' Final object disposal
If Not ceRptObjs Is Nothing Then ceRptObjs.Dispose()
If Not ceRptObj Is Nothing Then ceRptObj.Dispose()
If Not ceInfoStore Is Nothing Then ceInfoStore.Dispose()
If Not ceSession Is Nothing Then ceSession.Dispose()
If Not ceEnterpriseService Is Nothing Then ceEnterpriseService = Nothing
Catch ex As Exception
Response.Write(vbCrLf & "Error: " & ex.Message.ToString)
Response.Write("-" & ex.StackTrace)
Response.Write(ex.Source)
End Try
-- Creator of the XModuleSB Application: --