Results 1 to 2 of 2

Thread: [RESOLVED] Problem with Crystal Reports and SqlCe

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member jasonwucinski's Avatar
    Join Date
    Mar 2010
    Location
    Pittsburgh
    Posts
    452

    Resolved [RESOLVED] Problem with Crystal Reports and SqlCe

    Hi everyone. I'm trying to open a crystal report and have the datasource to be a data set but i'm having some problems. here's what I got so far:

    My application is using a sqlCe database. On form1, I dragged the dataset, from the datasource tab, onto the form. when the user clicks a button on form1, this is called:

    Code:
     Dim rpt As New WorkLink_Application() 'The report you created.
           
            Dim MyCommand As New SqlCeCommand()
            Dim myDA As New SqlCeDataAdapter()
            Dim myDS As New _MyDatabase_1DataSet 'The DataSet you created.
    
            Try
    
                Me.Tbl_WorkLinkUserInfoTableAdapter.Fill(Me._MyDatabase_1DataSet.tbl_WorkLinkUserInfo)
    
    'this is to see if the dataset is filled, which it appears to be as it prints out the row
    
                Dim dr As DataRow
                For Each dr In Me._MyDatabase_1DataSet.Tables("tbl_WorkLinkUserInfo").Rows
                    Debug.Print(dr("WorkLinkID").ToString & " " & dr("FirstName").ToString)
                Next
    
                rpt.SetDataSource(myDS)
    
    
                MycrystalReportViewer.CrystalReportViewer1.ReportSource = rpt
                MycrystalReportViewer.Show()
    
            Catch Excep As Exception
                MessageBox.Show(Excep.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
    on the crystal report, i went through the database expert wizard and selected the dataset from Create New Connection-->ADO.Net. I then dragged a field from my table onto the report. When the report is opened, though, the field is not shown. What's going on? what am i missing?

    thanks for any help. Please let me know if I should post this somewhere else or if more info is needed.
    thanks
    jason

    Oh, I'm using Visual Studio 2008 and Vb.net
    Last edited by jasonwucinski; May 26th, 2010 at 08:33 AM.

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