troubleshooting Question

Dynamic Send DataSET to Report

Avatar of Ennio
Ennio asked on
.NET ProgrammingVisual Basic.NET
2 Comments1 Solution1038 ViewsLast Modified:
I have a blank crystal report, and I would like to know how can I send a dataset to the report, and generate the report dynamic.

I have this on my code, but when I open the report I get an error saying the report has no table.

The dataset is getting the data from the DB, and I only have 3 column Name, Date, Time

Private Sub ReportView_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim rpt As New CrystalReport1() 'The report you created
        CompanyClassObject = New CompanyClass()
        DataSetCompanyDetails = CompanyClassObject.GetTimeDetailsForCompany(CopmanyID)
        Try
            rpt.SetDataSource(DataSetCompanyDetails)
            CrystalReportViewer1.ReportSource = rpt
 
        Catch Excep As Exception
            MessageBox.Show(Excep.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
 
    End Sub
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros