ArcFM Engine > Configure Mobile - Engine > Designer Staker > STEP 4: Create Workflow Manager Database > Optional: Staker Default Style Sheet |
Version: 10.1 |
Designer Staker provides default style sheets for the Staking Sheet and Bill of Materials when they are exported to Excel or a web browser. Designer Staker automatically creates this style sheet in a Temp directory when the user launches the application. The default location for the StakeJob.xsl style sheet is C:\Documents and Settings\<user name>\Local Settings\Temp.
Each time you display a staking sheet or bill of materials, Designer Staker creates a file called StakeJob.xml in the Temp directory mentioned above. This file is overwritten each time the user displays a staking sheet or bill of materials. If you want to retain a report, rename StakeJob.xml before displaying another report.
![]() |
The style sheet StakeJob.xsl will not be in this directory until you use either the Display Staking Sheet or Display Bill of Materials tools. |
If you want to use the default style sheet, no further configuration is necessary. The staking sheet and bill of materials are automatically exported using the default style sheet. However, if you want to use a different style sheet, you will need to add one (or both) of the following configuration values to the Configuration tab in Process Framework Administration Tool.
Use the following two configuration values to determine whether the reports are displayed using Excel or a web browser. Valid values for both are: Excel, Browser.
Below are sample style sheets for Display Bill of Materials and Display Staking Sheet.
BillOfMaterials.xsl |
Copy Code
|
---|---|
<?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html"/> <xsl:template match="StakeJob"> <html> <style> body { color: black; background-color: #FFFFFF; font-family: 'Verdana', 'Arial', 'Helvetica', sans-serif; font-size: small } h1 { font-family: 'Verdana', 'Arial', 'Helvetica', sans-serif; font-size: medium; font-style: normal; font-weight: bold; color: rgb(253, 71, 3); } hr { background-color: #545454; } img { font-family: 'Verdana', 'Arial', 'Helvetica', sans-serif; font-size: large; font-style: normal; font-weight: bold; color: rgb(253, 91, 29); } td { font-family: Arial; font-size: 12pt; } </style> <body> <table> <tr> <td align="center"> <img src="Logo.jpg" alt="Telvent" /> </td> <td width="400" align="center" valign="middle" rowspan="2"> <h1>Bill of Materials</h1> </td> </tr> <tr> <td align="center"> <h1>Designer Staker</h1> </td> </tr> </table> <hr /> <div style="margin-left:0.3in"> <table border="0" width="500"> <tr> <td width="150">Name:</td> <td width="350"> <xsl:value-of select="Name"/> </td> </tr> <tr> <td width="150">Description:</td> <td width="350"> <xsl:value-of select="Description"/> </td> </tr> </table> </div> <xsl:apply-templates select="Address"/> <br /> <table id="stake table" style="BORDER: black 1px solid; background-color:#eeeecc; table-layout:fixed" borderColor="#999999" cellSpacing="0" cellPadding="2" border="1" slcolor="#ffffcc" hlcolor="#BEC5DE"> <tr> <th style="width:5pc">Item</th> <th>Material</th> <th style="width:6pc">Required</th> <th style="width:6pc">Quantity</th> </tr> <xsl:apply-templates select="//Materials"/> </table> </body> </html> </xsl:template> <xsl:key name="material-by-item" match="Material" use="@Item" /> <xsl:template match="//Materials"> <xsl:for-each select="Material[count(. | key('material-by-item', @Item)[1]) = 1]"> <xsl:variable name="tmpTotal"> <total_amount> <xsl:for-each select="key('material-by-item', @Item)"> <xsl:choose> <xsl:when test="../../WorkType='Install'"> <item> <xsl:value-of select="@Quantity * ../../Quantity"/> </item> </xsl:when> </xsl:choose> </xsl:for-each> </total_amount> </xsl:variable> <xsl:variable name="myTotal" select="$tmpTotal"/> <xsl:if test="sum($myTotal/total_amount/item) > 0"> <tr> <td style="width:5pc" align="center" > <xsl:value-of select="@Item"/>   </td> <td align="center" > <xsl:value-of select="@MaterialDescription"/>   </td> <td align="center" > <xsl:value-of select="@Required"/>   </td> <td align="center" > <xsl:value-of select="sum($myTotal/total_amount/item)"/>   </td> </tr> </xsl:if> </xsl:for-each> </xsl:template> <xsl:template match="Address"> <div style="margin-left:0.3in"> <table border="0" width="500"> <tr> <td valign="top" width="150">Address:</td> <td width="350"> <xsl:if test="Address1!=''"> <xsl:value-of select="Address1"/> <br/> </xsl:if> <xsl:if test="Address2!=''"> <xsl:value-of select="Address2"/> <br/> </xsl:if> <xsl:choose> <xsl:when test="City!=''"> <xsl:value-of select="City"/><xsl:if test="State!=''"> , <xsl:value-of select="State"/> </xsl:if> <xsl:value-of select="Zip"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="State"/> <xsl:value-of select="Zip"/> </xsl:otherwise> </xsl:choose> </td> </tr> </table> </div> </xsl:template> </xsl:stylesheet> |
StakingSheet.xsl |
Copy Code
|
---|---|
<?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html"/> <xsl:template match="StakeJob"> <html> <style> body { color: black; background-color: #FFFFFF; font-family: 'Verdana', 'Arial', 'Helvetica', sans-serif; font-size: small } h1 { font-family: 'Verdana', 'Arial', 'Helvetica', sans-serif; font-size: medium; font-style: normal; font-weight: bold; color: rgb(253, 71, 3); } hr { background-color: #545454; } img { font-family: 'Verdana', 'Arial', 'Helvetica', sans-serif; font-size: large; font-style: normal; font-weight: bold; color: rgb(253, 91, 29); } td { font-family: Arial; font-size: 12pt; } </style> <body> <table> <tr> <td align="center"> <img src="Logo.jpg" alt="Telvent" /> </td> <td width="400" align="center" valign="middle" rowspan="2"> <h1>Staking Sheet</h1> </td> </tr> <tr> <td align="center"> <h1>Designer Staker</h1> </td> </tr> </table> <hr /> <div style="margin-left:0.3in"> <table border="0" width="500"> <tr> <td width="150">Name:</td> <td width="350"> <xsl:value-of select="Name"/> </td> </tr> <tr> <td width="150">Description:</td> <td width="350"> <xsl:value-of select="Description"/> </td> </tr> </table> </div> <xsl:apply-templates select="Address"/> <br /> <table id="stake table" style="BORDER: black 1px solid; background-color:#eeeecc; table-layout:fixed" borderColor="#999999" cellSpacing="0" cellPadding="2" border="1" slcolor="#ffffcc" hlcolor="#BEC5DE"> <tr> <th style="width:5pc">Stake</th> <th style="width:5pc">Work Type</th> <th>Code</th> <th>Description</th> <th style="width:6pc">Quantity</th> <th style="width:6pc"># of Wires</th> <th style="width:6pc">Lead Length</th> <th style="width:6pc">Backspan</th> <th>Remarks</th> </tr> <xsl:for-each select="Stakes/StakeItem"> <xsl:for-each select="AssemblyItem"> <tr> <td style="width:5pc" align="center" > <xsl:value-of select="../StakeId"/>   </td> <td style="width:5pc" align="center" > <xsl:value-of select="WorkType"/>   </td> <td align="center" > <xsl:value-of select="Code"/>   </td> <td align="center" > <xsl:value-of select="Description"/>   </td> <td style="width:6pc" align="center" > <xsl:value-of select="Quantity"/>   </td> <td style="width:6pc" align="center" > <xsl:value-of select="NumberOfWires"/>   </td> <td style="width:6pc" align="center" > <xsl:value-of select="Feature/Field[@Name='LEADLENGTH']/@Value"/>   </td> <td style="width:6pc" align="center" > <xsl:value-of select="Backspan"/>   </td> <td align="center" > <xsl:value-of select="Remarks"/>   </td> </tr> </xsl:for-each> </xsl:for-each> </table> <p align="center"> <hr /> <img src="StakingMap.png" alt="Staking Sheet Map" /> </p> </body> </html> </xsl:template> <xsl:template match="Address"> <div style="margin-left:0.3in"> <table border="0" width="500"> <tr> <td valign="top" width="150">Address:</td> <td width="350"> <xsl:if test="Address1!=''"> <xsl:value-of select="Address1"/> <br/> </xsl:if> <xsl:if test="Address2!=''"> <xsl:value-of select="Address2"/> <br/> </xsl:if> <xsl:choose> <xsl:when test="City!=''"> <xsl:value-of select="City"/><xsl:if test="State!=''"> , <xsl:value-of select="State"/> </xsl:if> <xsl:value-of select="Zip"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="State"/> <xsl:value-of select="Zip"/> </xsl:otherwise> </xsl:choose> </td> </tr> </table> </div> </xsl:template> </xsl:stylesheet> |