Problemas con reportes
Publicado por [email protected] (17 intervenciones) el 09/01/2009 15:31:26
Saludos
Gracias por su tiempo tengo la siguiente duda por que el siguiente codigo me da este error
Imports Microsoft.VisualBasic
Imports System.Data
Imports System.Data.OleDb
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports CrystalDecisions.ReportSource
Estos son los imports que utilizo
este es el codigo justo ebn la ultima linea me da error
Protected Sub BtnVer_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnVer.Click
Dim Adapter As OleDbDataAdapter
Dim ClsAdo As ClsAdoNet
ClsAdo = New ClsAdoNet
ClsAdo.AdoOpen("produccion")
Dim ds As DataSet
Dim RptDoc As ReportDocument
sSQL = ""
sSQL = " SELECT COTIZACION_NUMERO, FECHA"
sSQL &= " FROM TBL_COTIZACION "
sSQL &= " WHERE COTIZACION_NUMERO = 32267 "
RptDoc = New ReportDocument
Try
Adapter = New OleDbDataAdapter(sSQL, ClsAdo.Cn)
ds = New DataSet()
Adapter.Fill(ds, "RptRiesgos")
Dim RptDir As String = Server.MapPath("RptRiesgosCreditos.rpt")
RptDoc.Load(RptDir)
RptDoc.SetDataSource(ds)
RptDoc.PrintToPrinter(1, True, 0, 0)
RptDoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat,
Response, False, "")
rem ultima linea donde me da el error
Catch ex As Exception
Me.LblMensajes.ForeColor = Drawing.Color.Red
Me.LblMensajes.Text = "Excepcion " & ex.Message
Finally
RptDoc.Close()
RptDoc.Dispose()
End Try
End Sub
cuando pasa por dicha linea me da el siguiente error
Excepcion Error in File C:DOCUME~1ORODRI~1CONFIG~1TempRptRiesgosCreditos {1C815AC4-2003-43AD-877A-52081444E6E1}.rpt: Unable to connect: incorrect log on parameters.
Gracias por su tiempo tengo la siguiente duda por que el siguiente codigo me da este error
Imports Microsoft.VisualBasic
Imports System.Data
Imports System.Data.OleDb
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports CrystalDecisions.ReportSource
Estos son los imports que utilizo
este es el codigo justo ebn la ultima linea me da error
Protected Sub BtnVer_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnVer.Click
Dim Adapter As OleDbDataAdapter
Dim ClsAdo As ClsAdoNet
ClsAdo = New ClsAdoNet
ClsAdo.AdoOpen("produccion")
Dim ds As DataSet
Dim RptDoc As ReportDocument
sSQL = ""
sSQL = " SELECT COTIZACION_NUMERO, FECHA"
sSQL &= " FROM TBL_COTIZACION "
sSQL &= " WHERE COTIZACION_NUMERO = 32267 "
RptDoc = New ReportDocument
Try
Adapter = New OleDbDataAdapter(sSQL, ClsAdo.Cn)
ds = New DataSet()
Adapter.Fill(ds, "RptRiesgos")
Dim RptDir As String = Server.MapPath("RptRiesgosCreditos.rpt")
RptDoc.Load(RptDir)
RptDoc.SetDataSource(ds)
RptDoc.PrintToPrinter(1, True, 0, 0)
RptDoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat,
Response, False, "")
rem ultima linea donde me da el error
Catch ex As Exception
Me.LblMensajes.ForeColor = Drawing.Color.Red
Me.LblMensajes.Text = "Excepcion " & ex.Message
Finally
RptDoc.Close()
RptDoc.Dispose()
End Try
End Sub
cuando pasa por dicha linea me da el siguiente error
Excepcion Error in File C:DOCUME~1ORODRI~1CONFIG~1TempRptRiesgosCreditos {1C815AC4-2003-43AD-877A-52081444E6E1}.rpt: Unable to connect: incorrect log on parameters.
Valora esta pregunta


0