Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. crystal

crystal

Scheduled Pinned Locked Moved Visual Basic
databasehelpcsharpsql-server
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    twsted f8
    wrote on last edited by
    #1

    hi everyone. I am quite new to vb.net 2005 and I have been trying to connect my database programmatically to my sql server database. I have moved from one error to the next and I have followed the steps highlighted in the msdn walk through on crystal reports. Every time I run my code, I am getting an error message that states that the load report event has failed. and the object reference has not been set to an instance of the object. I have tried this several times and I don't know what to do. If anyone can help me I would be most greatful. The code I have been trying to use is as follows. Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared Public Class Form1 Private Sub ConfigureCrystalReports() Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo() myConnectionInfo.DatabaseName = "Northwind" myConnectionInfo.UserID = "user" myConnectionInfo.Password = "bob123" myConnectionInfo.ServerName = "chiko-shumba" Dim reportPath As String = Application.StartupPath & "\" & "NorthwindCustomers.rpt" myCrystalReportViewer.ReportSource = reportPath SetDBLogonForReport(myConnectionInfo) End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ConfigureCrystalReports() End Sub Private Sub SetDBLogonForReport(ByVal myConnectionInfo As ConnectionInfo) Dim myTableLogOnInfos As TableLogOnInfos = myCrystalReportViewer.LogOnInfo For Each myTableLogOnInfo As TableLogOnInfo In myTableLogOnInfos myTableLogOnInfo.ConnectionInfo = myConnectionInfo Next End Sub Private Sub myCrystalReportViewer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles myCrystalReportViewer.Load End Sub End Class

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups