Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class frmPortafolio
    Private Sub CrystalReportViewer1_Load(sender As Object, e As EventArgs) Handles CrystalReportViewer1.Load
        Dim crSubDB As Database
        Dim crTables As Tables
        Dim cInfo = New ConnectionInfo()

        cInfo.ServerName = My.Settings.ServidorSQL
        cInfo.UserID = My.Settings.UsuarioSQL
        cInfo.Password = My.Settings.ClaveSQL
        cInfo.DatabaseName = My.Settings.BaseDeDatos

        Dim oRPT = New rptPortafolio
        crSubDB = oRPT.Database
        crTables = crSubDB.Tables

        Dim crTableLogOnInfo As TableLogOnInfo

        For Each crTable In crTables
            crTableLogOnInfo = crTable.LogOnInfo
            crTableLogOnInfo.ConnectionInfo = cInfo
            crTable.ApplyLogOnInfo(crTableLogOnInfo)

        Next

        CrystalReportViewer1.ReportSource = oRPT
        'CrystalReportViewer1.Zoom(100)


    End Sub

    Private Sub frmPortafolio_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub
End Class