hi iam using this code to create crystal reports with dataset but it giving only columns names ,the data not coming only it simply displaying the column names
like this
categoryid categoryname Description
i think i shold add the dataset to the datatable of dataset.xsd
i just created a datatable with 3 columns but i don't know how to fill tthe datatable(mydatatable) on dataset1.xsd form
please help me on this
this is my code
private void Form1_Load(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection();
con.ConnectionString = ConfigurationSettings.AppSettings["conn"];
string strsql = "select categoryid,categoryname,description from categories";
SqlDataAdapter cmd = new SqlDataAdapter(strsql, con);
DataSet ds = new DataSet();
cmd.Fill(ds);
CrystalReport1 myDataReport = new CrystalReport1();
myDataReport.SetDataSource(ds,"mydatatable");
crystalReportViewer1.ReportSource = myDataReport;
}
Loading
Marko FrelihPosted Apr 23, 2010, 3:25 AM
I have three tables, that I connect to via Odbc Interface. Now, in my app, I need to get data from all three tables and there fore I created a DataSet object. Now, how do I setup report with data from this dataset object? And how do I fill previously mentioned dataset?