S. Butts
S. Butts

Reputation: 89

Data in Datatable, but not showing up in Crystal Report

I am brand-spankin' new to Crystal Reports, and I am trying to create a new report based on an existing one. The author of the original report is long gone. I apologize in advance if my terminology is poor.

The data for the report is based on a connection to an ADO.NET XML .xsd file, and that file in turn reflects data returned from a stored procedure. I have verified that the underlying DataTable for the report contains rows. However, whenever I invoke the crystal report object to create the table, it shows no rows. I am pretty certain the report does not believe there are any rows, as I have a special function to count the number of rows. If that function counts no rows, I have a special field that displays "No data." That field is being displayed.

Is there some setting or something I can investigate to figure this out?

Edit: more information requested I am using this in a C# Winforms application. The stored procedure is a select statement from SQL server 2008.

Upvotes: 1

Views: 5279

Answers (1)

S. Butts
S. Butts

Reputation: 89

Ok, there seems to be a bug in Crystal Reports. When I updated the .xsd file for the data map, Crystal Reports would not always update the underlying connection. Sometimes selecting "Verify Connection" would update it, and sometimes not. I'm guessing this is why the report showed no records. I had to remove all files -- the XSD database table map file, the report file, and all their supporting dependent files -- and then remove the connection. Once the connection was gone, I added all the files back in, and added the datatable connection. This got the correct mapping into the report.

Upvotes: 1

Related Questions