Bonjour
J'ai de nouveau un soucis avec mon tableau dynamique....
J'ai réussi à gérer dynamiquement les cellules avec leurs bordures mais j'ai un soucis pour faire la même chose mais par ligne...
Je vous envoie mon code et l'exemple que j'ai afin que vous puissiez mieux comprendre ce qui m'arrive...
Voila mon code pour gérer les bordures de mes cellules :
J'ai un problème au niveau de ce code car je n'arrive pas à créer une bordure pour chaque fin de ligne...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57 <xsl:template match="Cellule"> <xsl:choose> <xsl:when test="@style='titre'"> <fo:table-cell text-align="center" border-left-color="blue" border-left-style="solid" border-left-width="0.5pt" border-bottom-color="black" border-bottom-style="solid" border-bottom-width="0.5pt" border-top-color="black" border-top-style="solid" border-top-width="0.5pt"> <fo:block color="{$bleu}" padding-top="2pt" padding-bottom="2pt" > <xsl:apply-templates select="Texte"/> </fo:block> </fo:table-cell> </xsl:when> <xsl:otherwise> <xsl:if test="count(ancestor::Ligne/Cellule) = 1"> <fo:table-cell text-align="center" border-left-color="green" border-left-style="solid" border-left-width="0.5pt" > <fo:block color="{$bleu}" padding-top="2pt" padding-bottom="2pt" > <xsl:apply-templates select="Texte"/> </fo:block> </fo:table-cell> </xsl:if> <xsl:if test="count(ancestor::Ligne/Cellule) > 1 and position()!=last()"> <fo:table-cell text-align="center" border-left-color="red" border-left-style="solid" border-left-width="0.5pt" > <fo:block color="{$bleu}" padding-top="2pt" padding-bottom="2pt" > <xsl:apply-templates select="Texte"/> </fo:block> </fo:table-cell> </xsl:if> <xsl:if test="count(ancestor::Ligne/Cellule) > 1 and position()=last()"> <fo:table-cell text-align="center" border-left-color="orange" border-left-style="solid" border-left-width="0.5pt" border-right-color="black" border-right-width="0.5pt" border-right-style="solid"> <fo:block color="{$bleu}" padding-top="2pt" padding-bottom="2pt" > <xsl:apply-templates select="Texte"/> </fo:block> </fo:table-cell> </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:template> Voila mon code pour gérer mes lignes du tableau : <xsl:template match="Ligne"> <xsl:if test="count(ancestor::Tableau/Ligne) > 1 and position()!=last()"> <fo:table-row> <xsl:apply-templates select="Cellule"/> </fo:table-row> </xsl:if> <xsl:if test="count(ancestor::Tableau/Ligne) > 1 and position()=last()"> <fo:table-row> <xsl:apply-templates select="Cellule"/> </fo:table-row> </xsl:if> </xsl:template>
Je vous envoie le PDF que j'ai...
Je souhaiterai n'avoir que les bordures du bas cad celle juste avant la cellule titre... mais pour toute la ligne.
De plus, j'ai un décalage de ligne...
Partager