I created two reports, one in Microsoft reporting services and the other with crystal reports. I use the same dataset to pass to both. The Microsoft report displays fine, the crystal report viewer however just displays a pattern of vertical grey bars (see at bottom).
My code is below:
OdbcConnection conObj = newOdbcConnection("");
conObj.ConnectionString = @"Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=C:\webDev\test.accdb;";
conObj.Open();
String sqlStmt = "my select statement here: removed on purpose";
OdbcCommand cmd = newOdbcCommand(sqlStmt,conObj);
OdbcDataAdapter da = newOdbcDataAdapter(cmd);
testData ds = newtestData();
da.Fill(ds, "CMR_testData");
// record count is showing 2 records
int rc = ds.Tables["CMR_testData"].Rows.Count;
CrystalReport1 oRpt = newCrystalReport1();
oRpt.Database.Tables[0].SetDataSource(ds);
CrystalReportViewer1.ReportSource = oRpt;
CrystalReportViewer1.RefreshReport();
conObj.Close();
Here is what I see:
Hopefully someone can shed some light on what I am doing wrong.
Thanks,
Garth