Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

Report not showing in reportviewer, just vertical grey bars.

$
0
0

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:


crystal_report.PNG

 

Hopefully someone can shed some light on what I am doing wrong.

 

Thanks,

Garth


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>