Click here to Skip to main content
11,427,946 members (61,967 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# SQL
I want to make a crystal report on a behalf of a parameter
for this i have made a store procedure

and My C# coding is as below:

but no data is showing, dataset is empty
con.connect();
SqlCommand cmd = new SqlCommand("App_date", con.conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@Appointment_Date", dateTimePicker1.Value.Date));
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
DataSet1 ds = new DataSet1();
da.Fill(ds, "App_report");
CrystalReport1 crypt = new CrystalReport1();
crypt.SetDataSource(ds);
crystalReportViewer1.ReportSource = crypt;
con.conn.Close();

Any help will be appreciated
Posted 9-Dec-12 8:08am
Edited 9-Dec-12 8:13am
(no name)254.2K
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web03 | 2.8.150428.2 | Last Updated 9 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100