操作篇-让点名表自动显示上课日期

2014年08月11日 02:21
点击率:10116

    麦田默认的点名表并没有提供自动显示上课日期功能,因为考虑到很多学校上课日期后期变化大等因素。
但是确实有些学校规律性很强,有这个需求。

所以今天我就带大家,如何在麦田培训学校管理软件平台上去实现自动显示上课日期。


第一步:编辑点名表数据源:

麦田培训学校管理软件细节

代码如下:

ACCESS数据库语法:

table:LessonDegree
cmd: Select LessonDegree.StartDate from LessonDegree where LessonDegree.StartDate > now() and ClassID = @ClassID
GO


SQL数据库语法:

table:LessonDegree
cmd: Select LessonDegree.StartDate from LessonDegree where LessonDegree.StartDate > getdate() and ClassID = @ClassID
GO



第二步编辑报表,将原来备注以上的重复出现的TD代码替换成如下代码:

麦田培训学校管理软件细节

代码如下:

<td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[1]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[2]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[3]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[4]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[5]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[6]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[7]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[8]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[9]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[10]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[11]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[12]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[13]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[14]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[15]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[16]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[17]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[18]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[19]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[20]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[21]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[22]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[23]/StartDate)" /></td>
              <td width="0.6cm" style="font-size:5;"><xsl:value-of select="String:FormatDate('{0:M-d}',ds/LessonDegree[24]/StartDate)" /></td>



最终效果:

麦田培训学校管理软件细节