text@123
جمعه 08 آبان 1394, 18:16 عصر
سلام
کسی میدونه ایراد کدای من چیه که فایل گزارشم رو به صورت خالی نشونم میده؟:افسرده:
StiReport stiReport1 = new StiReport();
DataTable dtable = new DataTable("PayaneData");
OleDbConnection olconn = new OleDbConnection();
OleDbCommand olcomm = new OleDbCommand();
OleDbDataAdapter oladap = new OleDbDataAdapter();
//**************************************************
olconn.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0; Data Source= E:\Temp\Barnamenevis\Anbar_Payaneh\Anbar_Payaneh\A nbar_Payaneh\bin\Debug\pose_stock.mdb";
olcomm.Connection = olconn;
//ویرایش کردن اطلاعات و ذخیره تغییرات
olcomm.CommandText = string.Format("UPDATE Payaneh SET resed_print = True WHERE ID_p in ({0})", ids);
oladap.SelectCommand = olcomm;
oladap.Fill(dtable);
MessageBox.Show("تغییرات ذخیره شد");
fname = @"E:\Temp\Barnamenevis\Anbar_Payaneh\Anbar_Payaneh\A nbar_Payaneh\bin\Debug\Report.mrt";
stiReport1.Load(fname);
// stiReport1.DataSources.Clear();
stiReport1.RegData("Payane", dtable );
stiReport1.Design();
stiReport1.Dictionary.Synchronize();
stiReport1.Show();
olconn.Open();
olcomm.ExecuteNonQuery();
olconn.Close();
olcomm.Dispose();
olconn.Dispose();
کسی میدونه ایراد کدای من چیه که فایل گزارشم رو به صورت خالی نشونم میده؟:افسرده:
StiReport stiReport1 = new StiReport();
DataTable dtable = new DataTable("PayaneData");
OleDbConnection olconn = new OleDbConnection();
OleDbCommand olcomm = new OleDbCommand();
OleDbDataAdapter oladap = new OleDbDataAdapter();
//**************************************************
olconn.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0; Data Source= E:\Temp\Barnamenevis\Anbar_Payaneh\Anbar_Payaneh\A nbar_Payaneh\bin\Debug\pose_stock.mdb";
olcomm.Connection = olconn;
//ویرایش کردن اطلاعات و ذخیره تغییرات
olcomm.CommandText = string.Format("UPDATE Payaneh SET resed_print = True WHERE ID_p in ({0})", ids);
oladap.SelectCommand = olcomm;
oladap.Fill(dtable);
MessageBox.Show("تغییرات ذخیره شد");
fname = @"E:\Temp\Barnamenevis\Anbar_Payaneh\Anbar_Payaneh\A nbar_Payaneh\bin\Debug\Report.mrt";
stiReport1.Load(fname);
// stiReport1.DataSources.Clear();
stiReport1.RegData("Payane", dtable );
stiReport1.Design();
stiReport1.Dictionary.Synchronize();
stiReport1.Show();
olconn.Open();
olcomm.ExecuteNonQuery();
olconn.Close();
olcomm.Dispose();
olconn.Dispose();