Insert into DataSet( DataSetID, DataSetName, ParamName, ParamType, [Content], Remark, LockState, Orders)
values( 6, '考勤数据集', 'AttendID', 1, 
'
table:Merger
cmd:  Select 
 LessonDegree.Subject,
 LessonDegree.StartDate,
 LessonDegree.EndDate,
 LessonDegree.LessonType,
 LessonDegree.LeStateID,

 Attend.AtStateID,
 Attend.SignOn,
 Attend.SignOut,
 Attend.Lessons,
 Attend.Remark,

 StuClass.ClassID,
 StuClass.ClassName,
 StuClass.StudentID,
 StuClass.StudentName,
 StuClass.Lessons as TotalLessons,
 StuClass.CourseProgress,

 LessonDegree.TeacherID,
 Users.TrueName as TeacherName,
 Classroom.ClassroomName

from LessonDegree,Attend,StuClass,Users,Classroom 
where Attend.LessonDegreeID = LessonDegree.LessonDegreeID
  and Attend.StuClassID = StuClass.StuClassID
  and Users.UserID = LessonDegree.TeacherID
  and Classroom.ClassroomID = LessonDegree.ClassroomID
  and Attend.AttendID = @AttendID 
go
'
, '', 1, 6)
GO

Insert into Report( ReportID, ReportName, DataSetID, DataSetName, [Content], Location, LockState, Remark, Allow, GroupAndUsers, Orders)
values( 13, '考勤单(小票)', 6, '考勤数据集', '', '7', 1, '', 0, '', 13)
GO

Update DBInfo set DateAndTime='2012-03-02',DefaultReport='7|10|13|0|0|0|0|0|0|0|0|0|0|0'
GO