Przeglądaj źródła

修复group名称可能为空的错误

sunyj 8 lat temu
rodzic
commit
e1106766bd
1 zmienionych plików z 8 dodań i 1 usunięć
  1. 8 1
      src/main/resources/crystal2jasper.xsl

+ 8 - 1
src/main/resources/crystal2jasper.xsl

@@ -136,7 +136,14 @@
 					select="AreaPairProperties/Reference/@value" />
 				<group>
 					<xsl:attribute name="name">
-						<xsl:value-of select="substring-after($field,'.')"></xsl:value-of>
+						<xsl:choose>
+							<xsl:when test="substring-after($field,'.')">
+								<xsl:value-of select="substring-after($field,'.')" />
+							</xsl:when>
+							<xsl:otherwise>
+								<xsl:value-of select="$field" />
+							</xsl:otherwise>
+						</xsl:choose>
 					</xsl:attribute>
 					<groupExpression>
 						<xsl:value-of select="concat('$F{',$field,'}')"></xsl:value-of>