C#, Crystal Report and Stored Procedure

XtraReport CreateReprt()
{
rpp_donemsel rpr = new rpp_donemsel();
DataSet ds = new DataSet();
using (SqlConnection conn = new SqlConnection(Degiskenler.SqlStr))
{
conn.Open();
using (SqlCommand cmd = new SqlCommand(“sp_DonemselRpr”))
{
cmd.CommandType = CommandType.StoredProcedure;
cmd.Connection = conn;
cmd.Parameters.AddWithValue(“@tarih”, Request[“yil”]);
using (SqlDataAdapter adp = new SqlDataAdapter(cmd))
{
adp.Fill(ds);
rpr.DataSource = ds;
}
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
rpr.dt_detay.DataBindings.Add(“Text”, rpr.DataSource, “Detay”);

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

19 − fifteen =

This site uses Akismet to reduce spam. Learn how your comment data is processed.