Hi,
i generate a ADO.net DataSet Object and connect a report to this DataSet Object.
My datasource is an oracle database.
I set the connection with oledb (namespace: system.data.oledb).
I build the windows application and start without debugging
but the result report is: I see just the report header, no data!
Where's the problem?
oRpt = new CrystalReport2 ();
/* Use ADO.net object model to set up connection information */
OleDbConnection oleConn = new OleDbConnection
("Provider=MSDAORA.1" +
//Username
";User Id=user" +
//Password
";Password=pwd" +
//Replace with your datasource value
";Data Source=name"
OleDbDataAdapter oleAdapter = new OleDbDataAdapter("SELECT * FROM table", oleConn);
Dataset1 dataSet = new Dataset1();
/* Connect to, fetch data and disconnect from database */
oleAdapter.Fill (dataSet, "Customer"
/* Use Report Engine object model to pass populated dataset to report */
oRpt.SetDataSource (dataSet);
/* bind report object with data to the CRViewer */
crystalReportViewer1.ReportSource = oRpt;
Thanks,
Stephanie
i generate a ADO.net DataSet Object and connect a report to this DataSet Object.
My datasource is an oracle database.
I set the connection with oledb (namespace: system.data.oledb).
I build the windows application and start without debugging
but the result report is: I see just the report header, no data!
Where's the problem?
oRpt = new CrystalReport2 ();
/* Use ADO.net object model to set up connection information */
OleDbConnection oleConn = new OleDbConnection
("Provider=MSDAORA.1" +
//Username
";User Id=user" +
//Password
";Password=pwd" +
//Replace with your datasource value
";Data Source=name"
OleDbDataAdapter oleAdapter = new OleDbDataAdapter("SELECT * FROM table", oleConn);
Dataset1 dataSet = new Dataset1();
/* Connect to, fetch data and disconnect from database */
oleAdapter.Fill (dataSet, "Customer"
/* Use Report Engine object model to pass populated dataset to report */
oRpt.SetDataSource (dataSet);
/* bind report object with data to the CRViewer */
crystalReportViewer1.ReportSource = oRpt;
Thanks,
Stephanie