ASP.NET - Problemas con reportes

 
Vista:

Problemas con reportes

Publicado por Oscar (17 intervenciones) el 12/08/2008 17:43:37
Saludos a todos

Grasias por su atencion

tengo el siguiente problema con un reporte al momento de llamarlo me aprece el siguiente error

Excepcion Logon failed. Details: crdb_adoplus : Object reference not set to an instance of an object. Error in File C:WindowsTempRptCartas {6005D09A-3133-4AF8-8111-52FBB79AAA23}.rpt: Unable to connect: incorrect log on parameters.

el reporte lo configure con un dataset y el elemento de vb.net Crystal Report pero no me la direcion del Server.MapPath la verifique y es correcta pero siempre me da este error el codigo es el siguiente

Dim Adapter As OleDbDataAdapter
Dim ClsAdo As ClsAdoNet
ClsAdo = New ClsAdoNet
ClsAdo.AdoOpen("FINA")
Dim ds As New DataSet
Dim RptDoc As New ReportDocument
Dim sSQL As String = ""

sSQL = "SELECT A.Cod_Cli, A.Nombre, B.Direccion1, B.Direccion2, " _
& " B.Direccion3, B.Direccion4 " _
& " FROM Tbl_Clientes A, Tbl_Direcciones B " _
& " WHERE A.Cod_Cli = B.Cod_Cli" _
& " AND TO_CHAR(fecha_nacimiento,'MM') = '" & Me.Drop_Meses.SelectedValue & "'" _
& " AND A.Cust_Id IN(SELECT BILL_TO_CUST_ID FROM Ps_Bi_Hdr) "

Try
Adapter = New OleDbDataAdapter(sSQL, ClsAdo.Cn)
Adapter.Fill(ds, "PS_CARTAS")

Dim RptDir As String = Server.MapPath("RptCartas.rpt")
MsgBox(RptDir)
RptDoc.Load(RptDir)
RptDoc.SetDataSource(ds)
'crReportDocument.PrintToPrinter(1, True, 0, 0)
RptDoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat,
Response, False, "")

Catch ex As Exception
Me.LblMessage.ForeColor = Drawing.Color.Red
Me.LblMessage.Text = "Excepcion " & ex.Message

Finally
RptDoc.Close()
RptDoc.Dispose()
End Try
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder