Crystal Reports can not connect to the database

0

I come with a somewhat strange problem. You see, I am developing an application that shows several reports of the information that is stored. a couple of days ago it worked fine (or so I think), it showed all the reports without any problem.

but since yesterday I started having problems when trying to show the reports.

This is the message that shows me when trying to show any report

This is my code in the report

Imports CrystalDecisions.CrystalReports.Engine
Imports System.Data.SqlClient
Imports CrystalDecisions.Shared
Public Class frmReporte
       Dim cryRpt As New CrystalReport1
       Public codigo As String
       Private Sub frmReporte_Load(sender As Object, e As EventArgs) Handles Me.Load
        Dim myConnectionInfo As ConnectionInfo
        Dim crD As ReportDocument

        myConnectionInfo = New ConnectionInfo()

                crD = cryRpt

        For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In crD.Database.Tables
            Dim myTableLogonInfo As TableLogOnInfo = myTable.LogOnInfo
            myConnectionInfo.ServerName = bd.server
            myConnectionInfo.DatabaseName = bd.db
            myConnectionInfo.UserID = bd.id
            myConnectionInfo.Password = bd.pass
            myTableLogonInfo.ConnectionInfo = myConnectionInfo
            myTable.ApplyLogOnInfo(myTableLogonInfo)
        Next

        With New bd
           .consulta = ""
            .ejecutar(True, False, True)
            Dim ds As New DataSet
            ds = .lDataSet
            crD.SetDataSource(ds.Tables(0))
            crD.VerifyDatabase() //Aqui ocurre el problema
            'CrystalReportViewer1.RefreshReport()
        End With

        CrystalReportViewer1.ReportSource = crD
        CrystalReportViewer1.Refresh()
       End Sub
End Class

Before it worked properly, I do not know what may be happening now.

bd is a class for managing the database that you create, it works well. NOTE: Leave the query empty because I think it is not necessary to show it

    
asked by Edwin Munguia 15.06.2018 в 15:36
source

0 answers