impresion con crystal report
Publicado por Oscar (4 intervenciones) el 09/05/2017 00:31:37
Estimados consulta
he realizado una aplicación en VB.net 2012, la cual en desarrollo (PC, windows 2010 64 bits) , he puesto un reporte en crystal Reports 11 y no tengo problemas, cuando la Aplicación lo ejecuto en una pc con Windows 7 32 bits y trato de emitir el reporte me bota error
he instalado el CRRedist2005_x86 y CRRedist2008_x86 y me sale el mismo error
que debo de instalar para no tener estos problemas que estoy haciendo mal?
ESTE ES MI CODIGO
he realizado una aplicación en VB.net 2012, la cual en desarrollo (PC, windows 2010 64 bits) , he puesto un reporte en crystal Reports 11 y no tengo problemas, cuando la Aplicación lo ejecuto en una pc con Windows 7 32 bits y trato de emitir el reporte me bota error
he instalado el CRRedist2005_x86 y CRRedist2008_x86 y me sale el mismo error
que debo de instalar para no tener estos problemas que estoy haciendo mal?
ESTE ES MI CODIGO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Imports System.Configuration
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Imports Vb = Microsoft.VisualBasic
Imports Microsoft.Office.Interop
Imports CrystalDecisions.Shared
Imports CrystalDecisions.CrystalReports.Engine
.
.
.
Sub Imprime_receta(ByRef cIDatencion As String, ByRef lImprime As Boolean)
Dim oRep As New ReportDocument()
Dim Pf As New ParameterField()
Dim Pfs As New ParameterFields()
Dim Pdv As New ParameterDiscreteValue()
Dim cFormula As String
Dim cSql1 As String = ""
Dim cODBC_contrasena As String = My.Settings.Password.ToString.Trim.ToLower
Dim cODBC_Usuario As String = My.Settings.Usuario.ToString.Trim.ToLower
Dim cODBC_Catalogo As String = My.Settings.Catalogo.ToString.Trim.ToLower
Dim cODBC_Servidor As String = My.Settings.Servidor.ToString.Trim.ToUpper
Dim cODBC_Database As String = My.Settings.BaseDatos.ToString.Trim.ToUpper
' para validar la existencia del reporte
Dim Reporte As String = cPathReporte & "\SaludOcupacional\receta.rpt"
If Not IO.File.Exists(Reporte) Then
MessageBox.Show("No se encontro reporte:" & vbCrLf & _
Reporte, "Report Not Found", MessageBoxButtons.OK, MessageBoxIcon.Error)
Me.Close()
Exit Sub
End If
' Dim rsReceta As New MySqlDataAdapter(cSql1, cnxRRHH)
cFormula = " {V_RECETA_DETALLE.IDATENCION} = " & cIDatencion & ""
'Pf.Name = "@dFecha"
'Pdv.Value = dtpFecha.Text.ToString
'Pf.CurrentValues.Add(Pdv)
'Pfs.Add(Pf)
'CrystalReportViewer1.ParameterFieldInfo = Pfs
'oRep.SetDatabaseLogon(cODBC_Usuario, cODBC_contrasena, cODBC_Servidor, cODBC_Database, False)
oRep.Load(cPathReporte & "\SaludOcupacional\receta.rpt")
'oRep.SetDatabaseLogon(cODBC_Usuario, cODBC_contrasena, "SRVBD02", "RRHH")
oRep.SetDatabaseLogon(cODBC_Usuario, cODBC_contrasena, cODBC_Servidor, cODBC_Database, False)
oRep.RecordSelectionFormula = cFormula
CrystalReportViewer1.ReportSource = oRep
If lImprime Then
CrystalReportViewer1.PrintReport()
Else
CrystalReportViewer1.ShowCloseButton = True
CrystalReportViewer1.Dock = DockStyle.Fill
CrystalReportViewer1.Visible = True
CrystalReportViewer1.Enabled = True
End If
'CrystalReportViewer1.Anchor = CType(True, AnchorStyles)
' CrystalReportViewer1.Dock = DockStyle.Fill
' CrystalReportViewer1.ShowGroupTree()
' GroupTreeStyle = Groups.
End Sub
Valora esta pregunta
0