views:

196

answers:

1

I am working in visual 2008 with sql server 2005 as the back end. I am trying to create a crystal report with xsd file.This is what i did.

I created an empty xsd file from "Add New Items".i dragged the stored proc from the server explorer from the database which i want to attach to the crystal on to the xsd.

Created an empty crystal report,attached the xsd file on to the report through "Make new connection" and selected the fields which i want to display in the report.

Now when i do the print preview of the report is shows me the junk data and not the actual data that stored procedure returns.? I cant understand this behaviour.

Am i missing something?

+2  A: 

Thats Crystal Reports for you. What you are describing is typical behaviour do not be alarmed. I have written a number of reports specifying a .xml or .xsd document as the data type(You need to remember to select ADO.NET from add connections for the following to work). When I go to run the report I simply specify the actual datatable that I get from SqlServer/Oracle/etc by doing the following

report.Database.Tables[0].SetDataSource(dataTable);

Like you in the preview pane I get bogus values even though my xml file may contain actual data along with the schema but when I actually run the Crystal Report I get the expected out put.

runxc1 Bret Ferrier