Problem loading dataset to crystal report 
Author Message
 Problem loading dataset to crystal report

I have been looking at various code in this and other groups.  I
believe I saw someone post a message that you can load a report via a
dataset.  Here is the code I am attempting to use.

Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.ReportSource
Imports CrystalDecisions.Shared
Imports CrystalDecisions.Web
Imports CrystalEnterpriseLib
Imports CrystalInfoStoreLib
Imports CrystalPluginMgrLib
Imports System.Data.SqlClient
Imports System.IO

...

Private Sub btnShowInCrystalViewer_Click(ByVal sender As Object, ByVal
e As System.EventArgs) Handles btnShowInCrystalViewer.Click
        Dim oRpt As New CrystalReport2()

        Dim cn As New
SqlConnection("server=localhost;uid=sa;pwd=sa;database=prod")
        Dim cmd As New SqlDataAdapter("select * from county", cn)
        Dim ds As New DataSet()

        cmd.Fill(ds, "County")
                oRpt.SetDataSource(ds)
        CrystalReportViewer1.ReportSource = oRpt

        CrystalReportViewer1.Visible = True
    End Sub

In this code, CrystalReport2 is an rpt file in my web site.  I know
that my dataset is being populate fine.  However, when I make the
report viewer visible it only has the text box items present (no
data).   Must I do something to the original report to be able to bind
the dataset?



Tue, 01 Jun 2004 22:30:54 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problem in loading crystal report

2. Problem loading Report Crystal 4.6

3. Progress Bar While Crystal Reports Loads A Report

4. Progress Bar While Crystal Reports Loads A Report

5. Progress Bar While Crystal Reports Loads A Report

6. ASP.NET Report Document Cannot Load Crystal Report

7. Crystal Reports "Load report failed"

8. Crystal Report based on ADO.Net dataset prompts for database login

9. Help: Crystal Reports and programmatic DataSet

10. Crystal Report with DataSet reference.

11. Help: Crystal Report from programatic DataSet

12. Help: Crystal Report from programatic DataSet

 

 
Powered by phpBB® Forum Software