Click here to Skip to main content
15,894,907 members

Comments by ruzan hizar (Top 15 by date)

ruzan hizar 6-Mar-12 2:20am View    
Thanks for the help...but it also not supporting in my case. I'm taking the data from Access database using XML dataset and assigning the dataset to an object. from that object only i'm taking to the report.
here is my code...

DataTable dt = new DataTable();
Class.clsReport rpt = new Cost.Class.clsReport();
dt = rpt.GenerateMainReport(Pcode);

DataSet ds = new dsReport();
foreach (DataRow dr in dt.Rows)
{
ds.Tables["mainReport"].ImportRow(dr);
}
Report.MainReport objMain = new MainReport();
objMain.SetDataSource(ds);

crvMain.ReportSource = objMain;
crvMain.Refresh();
--------------------------------------------------------------------
public DataTable GenerateMainReport(string Pcode)
{
DataTable ds = new DataTable();
try
{
string sqlStr = "SELECT * FROM tblCost WHERE Product_Code = '" + Pcode + "'";

con = new OleDbConnection(clsConnection.connect);
con.Open();

da = new OleDbDataAdapter();
da.SelectCommand = new OleDbCommand(sqlStr, con);
da.SelectCommand.ExecuteNonQuery();
da.Fill(ds);
return ds;
}
catch (Exception ee)
{
throw ee;
return ds;
}
}
Please any one can check this codes and let me know if any other easy ways to do this task... because i'm new to c#...
Thanks.
ruzan hizar 17-Oct-11 9:03am View    
thanks archanakumari,
earlier i don't know what technology to use for this function. thansk again and now i can try in the trigges
ruzan hizar 17-Aug-11 7:05am View    
Thanks for the Explanation ..
Thanks a lot
ruzan hizar 17-Aug-11 7:01am View    
Thanks a lot All my friends..
It works.
thanks once again...
ruzan hizar 11-Jul-11 3:45am View    
while i'm saving the date from my form it send to sql server db as this format "mm/dd/yyyy"

but it save in the sql server as this format "yyyy/mm/dd"

when i'm selecting that date from crystal report the month column comes as date and date column as month.