VS.NET 2003 com Crystal Reports 10 e RAS 9

29/01/2007

[color=red:30b7c9f7cc]Título editado por Massuda Por favor, não use apenas letras maiúsculas no título/texto. No caso de reincidência, seus tópicos poderão vir a ser bloqueados. Leia as :arrow: [url=http://forum.clubedelphi.net/viewtopic.php?t=6689]Regras de Conduta[/url] do fórum.[/color:30b7c9f7cc]
:?:

Estou usando VS.Net para montar um DataSet (xsd). A partir dele monto um relatorio em crystal reports 10 que eu quero publicar em uma pasta que o RAS 9 tenha permissão de acesso, mas não estou conseguindo rodar o relatorio crystal.


Esta aparacendo o seguinte erro:

--------------------------------------------------------------------------------
Error in File C:\WINDOWS\TEMP\{7243DB8C-36BF-4227-8137-B78BC196C5F0}.rpt: The request could not be submitted for background processing.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Error in File C:\WINDOWS\TEMP\{7243DB8C-36BF-4227-8137-B78BC196C5F0}.rpt: The request could not be submitted for background processing.

Source Error:

Line 69: crs.ReportAppServer = ´192.168.0.105´
Line 70:
Line 71: crs.Open(´C:\Program Files\Crystal Decisions\Report Application Server 9\Reports\Teste.rpt´)
Line 72: ´.Report.FileName = ´C:\Program Files\Crystal Decisions\Report Application Server 9\Reports\Teste.rpt´
Line 73: crs.DatabaseController.SetDataSource(dsRelatorio)

Source File: C:\Crystal\RASNET\ras9_vbnet_web_DiscreteParam\WFrmReport.aspx.vb Line: 71
--------------------------------------------------------------------------------

Segue o codigo do sistema.

-------------------------------------------------------------------------------
Imports System.Data
Imports System.Data.OleDb
Imports CrystalDecisions.Web
Imports CrystalDecisions.ReportAppServer.ClientDoc
Imports CrystalDecisions.ReportAppServer.Controllers
Imports CrystalDecisions.ReportAppServer.DataDefModel

Public Class WFrmReport

Inherits System.Web.UI.Page

Dim mdb_path As String = ´C:\Program Files\Crystal Decisions\Report Application Server 9\Samples\En\Databases\xtremeteste.mdb´
Private conn As New OleDbConnection
Dim crs As ReportClientDocument

Public Sub PreencheDataSet()

conn.ConnectionString = ´Provider=Microsoft.Jet.OLEDB.4.0;Data Source=´ & mdb_path
Dim da As New OleDbDataAdapter( _
´Select OrderId From Orders ´, _
conn)

Dim daCustomer As New OleDbDataAdapter( _
´Select * from Customer ´, _
conn)


Dim daOrder As New OleDbDataAdapter( _
´Select * from Orders ´, _
conn)

Dim dsRelatorio As New dsxtreme

conn.Open()
daCustomer.Fill(dsRelatorio.Customer)
daOrder.Fill(dsRelatorio.Orders)
conn.Close()
crs = New ReportClientDocument
crs.ReportAppServer = ´192.168.0.105´

crs.Open(´C:\Program Files\Crystal Decisions\Report Application Server 9\Reports\Teste.rpt´)
crs.DatabaseController.SetDataSource(dsRelatorio)
´crs.ReportDocument.SetDataSource(dsRelatorio)
CrystalReportViewer1.ReportSource = crs
CrystalReportViewer1.DataBind()

End Sub

Public Sub InicializaReport()

PreencheDataSet()

End Sub

#Region ´ Web Form Designer Generated Code ´

´This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

End Sub
Protected WithEvents CrystalReportViewer1 As CrystalDecisions.Web.CrystalReportViewer

´NOTE: The following placeholder declaration is required by the Web Form Designer.
´Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
´CODEGEN: This method call is required by the Web Form Designer
´Do not modify it using the code editor.
InitializeComponent()

InicializaReport()

End Sub

End Region


Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
´Put user code to initialize the page here
End Sub

End Class
-------------------------------------------------------------------------------

Estou utilizando ASP.NET 2003 com Crystal Reports 10 e com o RAS 9 com servidor de relatorio.


Obrigado


Vilarino