Results 1 to 3 of 3

Thread: error msg

  1. #1

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075

    error msg

    not sure why I'm getting this error msg, I have no NULL values being passed...


    An unhandled exception of type 'System.NullReferenceException' occurred in pcms.exe

    Additional information: Object reference not set to an instance of an object.

    It bombs on the bold line...

    VB Code:
    1. Dim cmdView As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter("select purchase_date,credit_card_no,vendor_name,transaction_amt,sales_tax_amt,status_ind from pcms.pcms_pcard_transaction_header where purchase_date between TO_DATE('" & tranPeriod & "','mm/dd/yyyy') and TO_DATE('" & tranPeriodEnd & "','mm/dd/yyyy') ", objCon)
    2.         ds = New DataSet()
    3.         cmdView.Fill(ds, "cards")
    4.  
    5.         Dim oRpt As CrystalReport1 ' create new report object
    6.         [b]oRpt.SetDataSource(ds)[/b]
    7.         CrystalReportViewer1.ReportSource = oRpt
    It's tough being an unhandled exception...

    ___________
    VB.NET 2008
    VB.NET 2010
    ORACLE 11g
    CRYSTAL 11

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Dim oRpt As CrystalReport1 ' create new report object


    you comment says create new report, but you didnt use the New keyword.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075
    good eye...that did it
    It's tough being an unhandled exception...

    ___________
    VB.NET 2008
    VB.NET 2010
    ORACLE 11g
    CRYSTAL 11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width