Browse Source

PromptFields映射为变量时赋值

sunyj 8 years ago
parent
commit
e2c9b8b6dd
1 changed files with 6 additions and 4 deletions
  1. 6 4
      src/main/resources/crystal2jasper.xsl

+ 6 - 4
src/main/resources/crystal2jasper.xsl

@@ -109,13 +109,15 @@
 			<xsl:for-each select="PromptFields/Field[@type='PromptVarField']">
 				<xsl:variable name="name" select="Name/@value" />
 				<xsl:choose>
-					<xsl:when test="substring-after($name,'Pm-')">
-					</xsl:when>
+					<xsl:when test="substring-after($name,'Pm-')" />
 					<xsl:otherwise>
 						<variable>
 							<xsl:attribute name="name">
 								<xsl:value-of select="$name" />
 							</xsl:attribute>
+							<variableExpression>
+								<xsl:value-of select="DefaultPromptValues/DefaultValue/@value" />
+							</variableExpression>
 						</variable>
 					</xsl:otherwise>
 				</xsl:choose>
@@ -282,8 +284,8 @@
 		<xsl:param name="previousSectionsHeight" />
 		<xsl:variable name="type" select="@type" />
 		<xsl:choose>
-			<xsl:when test="$type='Box'"></xsl:when>
-			<xsl:when test="$type='Line'"></xsl:when>
+			<xsl:when test="$type='Box'" />
+			<xsl:when test="$type='Line'" />
 			<!-- staticText -->
 			<xsl:when test="$type='Text'">
 				<staticText>