creating simple gantview in SPD2007

Topics: Enhanced Blog Edition
Feb 29, 2008 at 4:48 PM
Well, I'd like to show how to create a simple ganttview moonth by month in SPD2007. May be for someone it would be easier than to write a code .
thanks


<th scope="col" class="ms-vh2">
<span style="width:28px">Jan</span><span style="width:2px">|</span>
<span style="width:24px">Feb</span><span style="width:2px">|</span>
<span style="width:27px">Mar</span><span style="width:2px">|</span>
<span style="width:26px">Apr</span><span style="width:2px">|</span>
<span style="width:27px">May</span><span style="width:2px">|</span>
<span style="width:26px">Jun</span><span style="width:2px">|</span>
<span style="width:27px">Jul</span><span style="width:2px">|</span>
<span style="width:27px">Aug</span><span style="width:2px">|</span>
<span style="width:26px">Sep</span><span style="width:2px">|</span>
<span style="width:27px">Oct</span><span style="width:2px">|</span>
<span style="width:26px">Nov</span><span style="width:2px">|</span>
<span style="width:27px">Dec</span><span style="width:2px">|</span>
</th>
</TR>

<!--Gantt Display-->
<td>
<xsl:if test="@ganttStartLength > 0">
<img src="/_layouts/images/blank.gif" height="20">
<xsl:attribute name="width">
<xsl:value-of select="concat(@ganttStartLength, 'px')"/>
</xsl:attribute>
</img>
</xsl:if>

<xsl:if test="@ganttMidLength > 0">
<xsl:choose>
<xsl:when test="@Executionx0020Status = 'In Flight'">
<img height="20" src="/sites/cto/ar/images/green.GIF">
<xsl:attribute name="width">
<xsl:value-of select="concat(@ganttMidLength, 'px')"/>
</xsl:attribute>
</img>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="@Executionx0020Status = 'Waiting'">
<img height="20" src="/sites/cto/ar/images/purple.GIF">
<xsl:attribute name="width">
<xsl:value-of select="concat(@ganttMidLength, 'px')"/>
</xsl:attribute>
</img>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="@Executionx0020Status = 'Complete'">
<img height="20" src="/sites/cto/ar/images/blue.GIF">
<xsl:attribute name="width">
<xsl:value-of select="concat(@ganttMidLength, 'px')"/>
</xsl:attribute>
</img>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="@Executionx0020Status = 'Caution'">
<img height="20" src="/sites/cto/ar/images/yellow.GIF">
<xsl:attribute name="width">
<xsl:value-of select="concat(@ganttMidLength, 'px')"/>
</xsl:attribute>
</img>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="@Executionx0020Status = 'On-Hold'">
<img height="20" src="/sites/cto/ar/images/red.GIF">
<xsl:attribute name="width">
<xsl:value-of select="concat(@ganttMidLength, 'px')"/>
</xsl:attribute>
</img>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="@Executionx0020Status = 'Cancelled'">
<img height="20" src="/sites/cto/ar/images/gray.GIF">
<xsl:attribute name="width">
<xsl:value-of select="concat(@ganttMidLength, 'px')"/>
</xsl:attribute>
</img>
</xsl:when>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:if>

<xsl:if test="@ganttEndLength > 0">
<img src="/_layouts/images/blank.gif" height="20">
<xsl:attribute name="width">
<xsl:value-of select="concat(@ganttEndLength, 'px')"/>
</xsl:attribute>
</img>
</xsl:if>
</td>

</TR>