IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Jasper Discussion :

tableau croisé avec 2 element a calculé (jrxml)


Sujet :

Jasper

  1. #1
    Nouveau membre du Club
    Inscrit en
    Septembre 2008
    Messages
    76
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 76
    Points : 37
    Points
    37
    Par défaut tableau croisé avec 2 element a calculé (jrxml)
    Bonjour , j'ai un gros probléme c'est que j'ai crée un fichier jrxml pour afficher un tableaux croisé avec dedans deux indicateurs à calculer
    en faites j'ai testé le fichier avec un seul indicateur ca marche nickel mais quand je remets le deuxiéme il m'affiche toujours qu'un seule et je visualise pas le second

    bon je met le jrxml , je sais que c'est long mais merci pour votre aide :
    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
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
    
    <jasperReport name="teesse" language="java" columnCount="1" pageWidth="595" pageHeight="842" columnWidth="570" columnSpacing="5" leftMargin="10" rightMargin="10" topMargin="20" bottomMargin="20">
      <style name="Arial_Normal" isDefault="true" fontName="Arial" fontSize="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false" />
      <style name="Arial_Bold" isDefault="false" fontName="Arial" fontSize="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1252" isPdfEmbedded="false" />
      <style name="Arial_Italic" isDefault="false" fontName="Arial" fontSize="10" isBold="false" isItalic="true" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica-Oblique" pdfEncoding="Cp1252" isPdfEmbedded="false" />
      <style name="Comic_Normal" isDefault="true" fontName="Arial" fontSize="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false" />
      <style name="Comic_Bold" isDefault="true" fontName="Arial" fontSize="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false" />
      <parameter name="titreRapport" class="java.lang.String" />
      <queryString><![CDATA[SELECT D1_axe4.dim14, D1_axe4.dim24, D1_axe1.dim11, SUM(fait1.Indicateur1), SUM(fait1.Indicateur2) FROM fait1 INNER JOIN D1_axe4 ON D1_axe4.ID_D1_axe4 = fait1.ID_D1_axe4 INNER JOIN D1_axe1 ON D1_axe1.ID_D1_axe1 = fait1.ID_D1_axe1 GROUP BY D1_axe4.dim14, D1_axe4.dim24, D1_axe1.dim11 ORDER BY dim14, dim24, dim11, SUM(fait1.Indicateur1), SUM(fait1.Indicateur2)]]></queryString>
      <field name="dim14" class="java.lang.String" />
      <field name="dim24" class="java.lang.String" />
      <field name="dim11" class="java.lang.String" />
      <field name="SUM(fait1.Indicateur1)" class="java.lang.Float" />
      <field name="SUM(fait1.Indicateur2)" class="java.lang.Float" />
      <title>
        <band height="50">
          <elementGroup />
          <textField>
            <reportElement x="0" y="0" width="595" height="32" style="Comic_Bold" />
            <box>
              <bottomPen lineWidth="0.5" />
            </box>
            <textElement textAlignment="Center">
              <font size="22" />
            </textElement>
            <textFieldExpression class="java.lang.String">$P{titreRapport}</textFieldExpression>
          </textField>
        </band>
      </title>
      <summary>
        <band height="100">
          <crosstab isRepeatColumnHeaders="true">
            <reportElement x="0" y="20" width="570" height="70" />
            <crosstabDataset>
              <dataset />
            </crosstabDataset>
            <rowGroup name="dim11Row" width="80" totalPosition="End">
              <bucket>
                <bucketExpression class="java.lang.String">$F{dim11}</bucketExpression>
              </bucket>
              <crosstabRowHeader>
                <cellContents backcolor="#B796F7" mode="Opaque">
                  <box>
                    <pen lineColor="black" />
                    <leftPen lineWidth="1.0" />
                    <bottomPen lineWidth="1.0" />
                    <rightPen lineWidth="1.0" />
                  </box>
                  <textField isStretchWithOverflow="true">
                    <reportElement style="Arial_Bold" x="5" y="0" width="75" height="20" forecolor="#000000" backcolor="#B796F7" mode="Opaque" />
                    <textElement verticalAlignment="Middle" textAlignment="Left" />
                    <textFieldExpression>$V{dim11Row}</textFieldExpression>
                  </textField>
                </cellContents>
              </crosstabRowHeader>
              <crosstabTotalRowHeader>
                <cellContents backcolor="#736DAF" mode="Opaque">
                  <box>
                    <pen lineColor="black" />
                    <leftPen lineWidth="1.0" />
                    <bottomPen lineWidth="1.0" />
                    <rightPen lineWidth="1.0" />
                  </box>
                  <staticText>
                    <reportElement style="Arial_Bold" x="5" y="0" width="75" height="20" forecolor="#FFFFFF" backcolor="#736DAF" mode="Opaque" />
                    <textElement verticalAlignment="Middle" textAlignment="Center" />
                    <text>Total</text>
                  </staticText>
                </cellContents>
              </crosstabTotalRowHeader>
            </rowGroup>
            <columnGroup name="dim24Column" height="20" totalPosition="End">
              <bucket>
                <bucketExpression class="java.lang.String">$F{dim24}</bucketExpression>
              </bucket>
              <crosstabColumnHeader>
                <cellContents backcolor="#D2C2FF" mode="Opaque">
                  <box>
                    <pen lineColor="black" />
                    <topPen lineWidth="1.0" />
                    <bottomPen lineWidth="1.0" />
                    <rightPen lineWidth="1.0" />
                  </box>
                  <textField isStretchWithOverflow="true">
                    <reportElement style="Arial_Bold" x="0" y="0" width="75" height="20" forecolor="#000000" backcolor="#D2C2FF" mode="Opaque" />
                    <textElement textAlignment="Center" verticalAlignment="Middle" />
                    <textFieldExpression>$V{dim24Column}</textFieldExpression>
                  </textField>
                </cellContents>
              </crosstabColumnHeader>
              <crosstabTotalColumnHeader>
                <cellContents backcolor="#736DAF" mode="Opaque">
                  <box>
                    <pen lineColor="black" />
                    <topPen lineWidth="1.0" />
                    <bottomPen lineWidth="1.0" />
                    <rightPen lineWidth="1.0" />
                  </box>
                  <staticText>
                    <reportElement style="Arial_Bold" x="0" y="0" width="75" height="20" forecolor="#FFFFFF" backcolor="#736DAF" mode="Opaque" />
                    <textElement textAlignment="Center" verticalAlignment="Middle" />
                    <text>Total</text>
                  </staticText>
                </cellContents>
              </crosstabTotalColumnHeader>
            </columnGroup>
            <measure name="measureSUM(fait1.Indicateur1)" class="java.lang.Float" calculation="Sum">
              <measureExpression>$F{SUM(fait1.Indicateur1)}</measureExpression>
            </measure>
            
            <measure name="measureSUM(fait1.Indicateur2)" class="java.lang.Float" calculation="Count">
              <measureExpression>$F{SUM(fait1.Indicateur2)}</measureExpression>
            </measure>
            
            <crosstabCell width="75" height="20">
              <cellContents backcolor="#FFFFFF" mode="Opaque">
                <box>
                  <bottomPen lineWidth="1.0" />
                  <rightPen lineWidth="1.0" />
                </box>
                <textField>
                  <reportElement x="0" y="0" width="75" height="20" forecolor="#000000" backcolor="#FFFFFF" mode="Opaque" />
                  <textElement textAlignment="Center" verticalAlignment="Middle" />
                  <textFieldExpression class="java.lang.Float">$V{measureSUM(fait1.Indicateur1)}</textFieldExpression>
                </textField>
                
                <textField>
                  <reportElement x="0" y="0" width="75" height="20" forecolor="#000000" backcolor="#FFFFFF" mode="Opaque" />
                  <textElement textAlignment="Center" verticalAlignment="Middle" />
                  <textFieldExpression class="java.lang.Float">$V{measureSUM(fait1.Indicateur2)}</textFieldExpression>
                </textField>
                
                
              </cellContents>
            </crosstabCell>
            <crosstabCell width="75" height="20" rowTotalGroup="dim11Row">
              <cellContents backcolor="#736DAF" mode="Opaque">
                <box>
                  <bottomPen lineWidth="1.0" />
                  <rightPen lineWidth="1.0" />
                </box>
                <textField>
                  <reportElement x="0" y="0" width="75" height="20" forecolor="#FFFFFF" backcolor="#736DAF" mode="Opaque" />
                  <textElement textAlignment="Center" verticalAlignment="Middle" />
                  <textFieldExpression class="java.lang.Float">$V{measureSUM(fait1.Indicateur1)}</textFieldExpression>
                </textField>
                
                
                
                
              </cellContents>
            </crosstabCell>
            <crosstabCell width="75" height="20" columnTotalGroup="dim24Column">
              <cellContents backcolor="#736DAF" mode="Opaque">
                <box>
                  <bottomPen lineWidth="1.0" />
                  <rightPen lineWidth="1.0" />
                </box>
                <textField>
                  <reportElement x="0" y="0" width="75" height="20" forecolor="#FFFFFF" backcolor="#736DAF" mode="Opaque" />
                  <textElement textAlignment="Center" verticalAlignment="Middle" />
                  <textFieldExpression class="java.lang.Float">$V{measureSUM(fait1.Indicateur1)}</textFieldExpression>
                </textField>
                
                
                
                
              </cellContents>
            </crosstabCell>
            <crosstabCell width="75" height="20" rowTotalGroup="dim11Row" columnTotalGroup="dim24Column">
              <cellContents backcolor="#736DAF" mode="Opaque">
                <box>
                  <bottomPen lineWidth="1.0" />
                  <rightPen lineWidth="1.0" />
                </box>
                <textField>
                  <reportElement x="0" y="0" width="75" height="20" forecolor="#FFFFFF" backcolor="#736DAF" mode="Opaque" />
                  <textElement textAlignment="Center" verticalAlignment="Middle" />
                  <textFieldExpression class="java.lang.Float">$V{measureSUM(fait1.Indicateur1)}</textFieldExpression>
                </textField>
                
                
                
                
                
              </cellContents>
            </crosstabCell>
          </crosstab>
        </band>
      </summary>
    </jasperReport>

  2. #2
    Nouveau membre du Club
    Inscrit en
    Septembre 2008
    Messages
    76
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 76
    Points : 37
    Points
    37
    Par défaut
    apparemment j'ai retesté le truc , ce qu'il fait il calcul les 2 indicateurs mais il affiche qu'un seul, le 2eme calculé s'affiche sur le 1er (peut etre)!!!!
    si quelq'un sait comment faire ?

  3. #3
    Nouveau membre du Club
    Inscrit en
    Septembre 2008
    Messages
    76
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 76
    Points : 37
    Points
    37
    Par défaut
    c'est resolu , c'etait la hauteur de la cellule qui etait trop petite

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Tableau croisé avec deux collections
    Par nathieb dans le forum JSF
    Réponses: 2
    Dernier message: 25/09/2008, 17h33
  2. Tableau croisé avec tranche horraire
    Par Charly_An dans le forum Deski
    Réponses: 4
    Dernier message: 01/07/2008, 00h09
  3. Créer un tableau croisé avec 4 données
    Par valalu dans le forum IHM
    Réponses: 1
    Dernier message: 19/07/2007, 06h59
  4. Tableau croisé avec BIRT
    Par soumou dans le forum BIRT
    Réponses: 1
    Dernier message: 08/09/2006, 09h21

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo