Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CR Report from ado.net dataset contains no data

Status
Not open for further replies.

wreiche

IS-IT--Management
Sep 28, 2006
36
CA
I have a working CR report which uses an oracle database for a data source. I am modifying it to use an ado.net (visual studio 2005/C#) dataset as a data source. I am following the procedure described in Business Objects "Crystal Reports for Visual Studio .net Reporting Off ADO.Net DataSets" document. The recordset passed to CR contains 20 records, but the report shows no records.

Any ideas?

string SqlCmd = "select fielda, fieldb from tablec";
OleDbDataAdapter OleAdapter = new OleDbDataAdapter(SqlCmd, DbConn);
BillAirspaceDataSet AirspaceDataSet = new BillAirspaceDataSet();
OleAdapter.Fill(AirspaceDataSet);
CrDoc.SetDataSource(AirspaceDataSet);

 
Comment out the selection and see what you've got. One common problem in nulls, which stop anything unless you first test with IsNull

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Not sure what you meant by "comment out the selection".

I set sqlcmd to blanks, and SetDataSource returns Command text was not set for the command object.

Neither of the columns in the table contain nulls.


 
Found my problem. The second argument to OleAdapter.Fill must be specified.

OleAdapter.Fill(AirspaceDataSet, "bill_airspace");
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top