I created a new crystalreport1.rpt , and also created a new DataSet1.xsd .
For the crystalrepor1.rpt i have the given DataSet1.xsd as datasource .
Now in the default.aspx i want to create a dataset of my requirement and assign that to dataset1.xsd and bind this to crystalreportviewer control which i have placed in default.aspx
SqlConnection oconnection = oclsdbconn.Getconnection();
string str = "select cat_name,prod_name from category_det,product_det";
oconnection.Open();
SqlDataAdapter dscmd = new SqlDataAdapter(str, oconnection);
DataSet ds = new DataSet("DataSet1");
dscmd.Fill(ds);
CrystalReportViewer1 report = new CrystalReportViewe1r();
CrystalReportViewer1.datasource = report;
code goes something like what i have mentioned above. Please solve this by giving correct code .
coollife -4 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.