You are currently viewing C#, Crystal Report and Stored Procedure

C#, Crystal Report and Stored Procedure

Spread the love

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 yanıt yazın

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