none
instanciar crystal report RRS feed

  • Pregunta

  • Estimados tengo un problemita que  no puedo darle solucion

    tengo el siguiente codigo

    Imports c_Entidad
    Imports c_Negocio
    Imports System.IO
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    
    Public Class Liquidacion_impresion
        Dim dtDetalle As DataTable
    
        Private Sub Liquidacion_impresion_Load(sender As Object, e As EventArgs) Handles MyBase.Load
            Me.txtAno.Text = Date.Today.Year.ToString
            CargarMeses(Me.cmbMes)
            Me.cmbMes.SelectedIndex = Date.Now.Month - 1
            ReportViewer1.Visible = False
            Me.ReportViewer1.RefreshReport()
        End Sub
    
       
        
    
        Private Sub dgvLiquidaciones_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvLiquidaciones.CellClick
            If e.ColumnIndex = 0 Then
                If dgvLiquidaciones.Rows.Count <= 0 Then Exit Sub
                If dgvLiquidaciones.Rows(dgvLiquidaciones.CurrentRow.Index).Cells(0).Value = True Then
                    dgvLiquidaciones.Rows(dgvLiquidaciones.CurrentRow.Index).Cells(0).Value = False
                Else
    
                    dgvLiquidaciones.Rows(dgvLiquidaciones.CurrentRow.Index).Cells(0).Value = True
    
                End If
            End If
    
            If e.ColumnIndex = 0 Then
                Call Imprimir_liquidacion()
            End If
    
    
        End Sub
    
        Private Sub dgvLiquidaciones_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvLiquidaciones.CellContentClick
    
        End Sub
    
        Sub Imprimir_liquidacion()
    
            Dim oRep As New ReportDocument()
    
            'Dim Pf As New ParameterField()
            'Dim Pfs As New ParameterFields()
            'Dim Pdv As New ParameterDiscreteValue()
            'Dim dtLiquidacion As New DataTable
            'Dim cPathReporte As String = "D:\Proy_net\rrhh_net\RRHH_Capas\WinCliente\Reportes"
    
            'dtLiquidacion = LiquidacionBL.LiquidacionHojaBL(dgvLiquidaciones.Rows(dgvLiquidaciones.CurrentRow.Index).Cells("ID").Value)
            'Pf.Name = "@nIdLiquidacion"
            'Pdv.Value = dgvLiquidaciones.Rows(dgvLiquidaciones.CurrentRow.Index).Cells("ID").Value
            'Pf.CurrentValues.Add(Pdv)
            'Pfs.Add(Pf)
    
            'ReportViewer1.ParameterFieldInfo = Pfs
    
            'oRep.Load(cPathReporte & "\LIQUIDACION.RPT")
            'oRep.SetDatabaseLogon("sa", "chosica", "srvbd02", "RRHH")
            '' oRep.RecordSelectionFormula = "cdate({v_Atencion.FECHA})= cdatetime('" & dtpFecha.Text.ToString & "')"
            'ReportViewer1.ReportSource = oRep
            'ReportViewer1.ShowCloseButton = True
            'ReportViewer1.Visible = True
            'ReportViewer1.ShowCloseButton = True
            'ReportViewer1.Anchor = AnchorStyles.Top
            'ReportViewer1.Dock = DockStyle.Fill
            'ReportViewer1.AutoSize = True
            'ReportViewer1.Visible = True
        End Sub
    
        Private Sub ReportViewer1_Leave(sender As Object, e As EventArgs) Handles ReportViewer1.Leave
            ReportViewer1.Visible = False
        End Sub

    Error

    Estoy trabajando con Visual studio 2012

    Crystal report 13.0.20 para 64 bits

    Windows 10 pro 64 

    Alguien me puede orientar que puede estar sucediendo

    viernes, 17 de enero de 2020 23:15

Todas las respuestas