日期:2014-05-19  浏览次数:20616 次

想疯了(一个报表显示问题)在线等
crtDay   oRpt   =   new   crtDay();

                        string   strSql   =   "select   s.Code,s.Name,o.OnDutyDay,o.UpPassTime,(select   datename(weekday, ' "+sDate+ " ')   )as   WeekDate,o.OffPassTime,o.LateDuty,o.EarlyDuty,o.Abnormity,o.OT   from   tblStaff   as   s,tblOnDutyNote   as   o   where   s.Code=o.StaffID   and   o.OnDutyDay= ' "   +   sDate   +   " ' ";
                        DataSet   ds   =   null;
                        string   ErrMessage   =   " ";
                        if   (DBAccess.ExecSql(strSql,   ref   ds,   ref   ErrMessage)   ==   0)
                        {
                                //oRpt.Load(Application.StartupPath   +   "   crtDay1.rpt ");
                                if   (ds.Tables[0].Rows.Count   >   0)
                                {
                                        for   (int   i   =   0;   i   <   ds.Tables[0].Rows.Count;   i++)
                                        {
                                                string   weekDate   =   null;
                                                weekDate   =   ds.Tables[0].Rows[i][ "WeekDate "].ToString();
                                                //string[]   arry   =   new   string[7]   {   "Moday ",   "Tuesday ",   "Wednesday ",   "Thursday ",   "Friday ",   "Saturday ",   "Sunday "};
                                                switch   (weekDate)
                                                {
                                                        case   "Moday ":
                                                                weekDate   =   "星期一 ";