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

Bases de données Delphi Discussion :

Qreport avec groupe et plusieurs query


Sujet :

Bases de données Delphi

  1. #1
    Membre chevronné Avatar de Oluha
    Profil pro
    Inscrit en
    Novembre 2004
    Messages
    2 183
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations forums :
    Inscription : Novembre 2004
    Messages : 2 183
    Points : 1 967
    Points
    1 967
    Par défaut Qreport avec groupe et plusieurs query
    Salut

    J'ai déjà fait des Qreports "basiques" qui ne nécéssitaient qu'une seule requête.
    Seulement là je dois en faire un qui selon moi n'est pas possible à faire en une seule requête mais je ne sais pas du tout comment faire.

    Quelques explications :
    - j'ai plusieurs "jobs" regroupés dans une table
    - chaque job a une prise en charge (PEC) (une table PEC)
    - chaque PEC peut avoir 0,n routage (une table ROUT)
    - chaque PEC peut avoir 0,n déduplication (une table DEDUP)
    - les dédups et les routages sont totalement indépendants
    - les données d'une dedup et d'un routage différentes (pas la même structure)

    J'aimerai donc faire un report de la sorte
    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
    PEC1
    détails
     
    liste des routages
     
    liste des dedups
    ----------------------------
    PEC2
    détails
     
    liste des routages
     
    liste des dedups
     
    .
    .
    .
    Comme je l'ai dis je ne pense pas qu'il soit possible de faire ça avec une seule requête, mais comment je doit faire des groupes pour les PC, il faudrait faire une requête pour la liste des routages et une pour la liste des dédup à chaque saut de groupe.
    Est-ce possible ? Si oui, comment faut-il faire ?

    Merci

  2. #2
    Modérateur
    Avatar de Rayek
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mars 2005
    Messages
    5 235
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : France, Haute Savoie (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mars 2005
    Messages : 5 235
    Points : 8 504
    Points
    8 504
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     
    Select Liste Champ table PEC, 'ROUTAGE' as Type, List Champ Table Rout from (PEC inner join Rout on PEC.ChampCommun=Rout.ChampCommun)
    union
    Select Liste Champ table PEC, 'DEDUP' as Type ,List Champ Table DEDUP from (PEC Inner join DEDUP on PEC.ChampCommun=DEDUP.ChampCommun)
    Order by Nom Pec, desc Type,Nom Rout/DEDUP

    Devrait te donner une reponse du style :

    Nom PEC, autres champs PEC,ROUTAGE, Nom Rout, Autres champs Rout
    ...
    Nom PEC, autres champs PEC,DEDUP, Nom DEDUP, Autres champs DEDUP
    ...


    Il faut que dans la requete Union Tous les champs est le même nom (faut caster les champs avec un AS NomDuChamp)

    Apres dans le report tu crées :
    - Un premier groupe qui pointe par rapport a NOM PEC
    - un sous groupe qui Pointera sur le type (Routage/DEDUP) et qui fera une casssure de groupe sur le Type.
    Modérateur Delphi

    Le guide du bon forumeur :
    __________
    Rayek World : Youtube Facebook

  3. #3
    Membre chevronné Avatar de Oluha
    Profil pro
    Inscrit en
    Novembre 2004
    Messages
    2 183
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations forums :
    Inscription : Novembre 2004
    Messages : 2 183
    Points : 1 967
    Points
    1 967
    Par défaut
    comme je l'ai dis, DEDUP et ROUT n'ont pas du tout la même structure, je ne peux pas faire une union

  4. #4
    Membre éclairé

    Profil pro
    Inscrit en
    Décembre 2002
    Messages
    1 085
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : Belgique

    Informations forums :
    Inscription : Décembre 2002
    Messages : 1 085
    Points : 886
    Points
    886
    Par défaut
    Tu as regardé du coté des QrSubDetail ?

  5. #5
    Modérateur
    Avatar de Rayek
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mars 2005
    Messages
    5 235
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : France, Haute Savoie (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mars 2005
    Messages : 5 235
    Points : 8 504
    Points
    8 504
    Par défaut
    Citation Envoyé par Oluha
    comme je l'ai dis, DEDUP et ROUT n'ont pas du tout la même structure, je ne peux pas faire une union

    Citation Envoyé par Malatar
    Il faut que dans la requete Union Tous les champs est le même nom (faut caster les champs avec un AS NomDuChamp)
    Exemple

    Table1: C1,C2,C3
    Table2: C2,C4,C5
    Table3: C2,C6,C7,C8

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     
    Select T1.C1,T1.C2,T1.C3,T2.C4 as Nom,T2.C5 as Detail1, '' as Detail2 from Table1 as T1 inner join Table2 as T2 on T1.C2=T2.C2
    Union
    Select T1.C1,T1.C2,T1.C3,T3.C6 as Nom,T3.C7 as Detail1,T3.C8 as Detail2 from Table1 as T1 inner join Table3 as T3 on T1.C2=T3.C2
    Order by T1.C1,desc Nom
    Modérateur Delphi

    Le guide du bon forumeur :
    __________
    Rayek World : Youtube Facebook

  6. #6
    Membre chevronné Avatar de Oluha
    Profil pro
    Inscrit en
    Novembre 2004
    Messages
    2 183
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations forums :
    Inscription : Novembre 2004
    Messages : 2 183
    Points : 1 967
    Points
    1 967
    Par défaut
    Citation Envoyé par portu
    Tu as regardé du coté des QrSubDetail ?
    c'est ce que j'essaye de faire depuis plusieurs heures mais j'y arrive pas, quand je visualise les infos du sous détail ne veulent pas s'afficher

  7. #7
    Membre chevronné Avatar de Oluha
    Profil pro
    Inscrit en
    Novembre 2004
    Messages
    2 183
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations forums :
    Inscription : Novembre 2004
    Messages : 2 183
    Points : 1 967
    Points
    1 967
    Par défaut
    ta solution malatar pourrait marché mais les labels pour dire à quoi correspond les valeurs ne sont pas les mêmes et la mise en forme doit être différentes

  8. #8
    Membre actif
    Profil pro
    Inscrit en
    Mai 2003
    Messages
    265
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2003
    Messages : 265
    Points : 290
    Points
    290
    Par défaut
    Salut,

    1- Les données :

    Dans ton cas il faut 3 Requete :
    - La maitre "PEC"
    - Deux details "ROUT" et "DEDVP"

    Il faudra un TDataSource qui pointe sur la requete "PEC", appelons le dsPEC.

    Tu dois faire des relation maitre detail entre PEC et ROUT ainsi que entre PEC et DEVPC.
    Dans les requetes ROUT et DEDVP tu affecte à datasource le dsPEC.

    Pour le SQL des requetes detail regarde dans l'aide pour TQuery.Datasource.

    2- L'état :
    La bande détail et l'etat : rien a signalé ils pointent sur la Requete PEC.
    Puis tu ajoutes 2 bandes de sous detail et tu affectes à TQRSubDetail.dataset une requetes de détail.

    @+

  9. #9
    Membre chevronné Avatar de Oluha
    Profil pro
    Inscrit en
    Novembre 2004
    Messages
    2 183
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations forums :
    Inscription : Novembre 2004
    Messages : 2 183
    Points : 1 967
    Points
    1 967
    Par défaut
    c'est ce que j'ai fais mais pas moyen d'avoir les infos du sous détail à l'affichage.
    J'ai essayé pleins d'autres trucs que j'ai trouvé dans des exemples mais rien n'y fait.
    Voici le code de ma fiche si ça inspire quelqu'un (pour le moment je ne me suis pas occupée de ROUT, juste DEDUP)
    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
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    object Form7: TForm7
      Left = 271
      Top = 158
      Width = 1001
      Height = 832
      Caption = 'Form7'
      Color = clBtnFace
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      OldCreateOrder = False
      Scaled = False
      PixelsPerInch = 96
      TextHeight = 13
      object QuickRep1: TQuickRep
        Left = 8
        Top = 8
        Width = 794
        Height = 1123
        Frame.Color = clBlack
        Frame.DrawTop = False
        Frame.DrawBottom = False
        Frame.DrawLeft = False
        Frame.DrawRight = False
        DataSet = Qpec
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -13
        Font.Name = 'Arial'
        Font.Style = []
        Functions.Strings = (
          'PAGENUMBER'
          'COLUMNNUMBER'
          'REPORTTITLE')
        Functions.DATA = (
          '0'
          '0'
          #39#39)
        Options = [FirstPageHeader, LastPageFooter]
        Page.Columns = 1
        Page.Orientation = poPortrait
        Page.PaperSize = A4
        Page.Values = (
          100
          2970
          100
          2100
          100
          100
          0)
        PrinterSettings.Copies = 1
        PrinterSettings.Duplex = False
        PrinterSettings.FirstPage = 0
        PrinterSettings.LastPage = 0
        PrinterSettings.OutputBin = Auto
        PrintIfEmpty = True
        SnapToGrid = True
        Units = Native
        Zoom = 100
        object QRBand1: TQRBand
          Left = 38
          Top = 38
          Width = 718
          Height = 81
          Frame.Color = clBlack
          Frame.DrawTop = False
          Frame.DrawBottom = False
          Frame.DrawLeft = False
          Frame.DrawRight = False
          AlignToBottom = False
          Color = clWhite
          ForceNewColumn = False
          ForceNewPage = False
          Size.Values = (
            214.3125
            1899.70833333333)
          BandType = rbTitle
        end
        object QRBand2: TQRBand
          Left = 38
          Top = 119
          Width = 718
          Height = 106
          Frame.Color = clBlack
          Frame.DrawTop = False
          Frame.DrawBottom = False
          Frame.DrawLeft = False
          Frame.DrawRight = False
          AlignToBottom = False
          Color = clWhite
          ForceNewColumn = False
          ForceNewPage = False
          LinkBand = QRSubDetail1
          Size.Values = (
            280.458333333333
            1899.70833333333)
          BandType = rbDetail
          object QRDBText1: TQRDBText
            Left = 0
            Top = 8
            Width = 13
            Height = 17
            Frame.Color = clBlack
            Frame.DrawTop = False
            Frame.DrawBottom = False
            Frame.DrawLeft = False
            Frame.DrawRight = False
            Size.Values = (
              44.9791666666667
              0
              21.1666666666667
              34.3958333333333)
            Alignment = taLeftJustify
            AlignToBand = False
            AutoSize = True
            AutoStretch = False
            Color = clWhite
            DataSet = Qpec
            DataField = 'ID'
            Transparent = False
            WordWrap = True
            FontSize = 10
          end
          object QRDBText2: TQRDBText
            Left = 16
            Top = 8
            Width = 69
            Height = 17
            Frame.Color = clBlack
            Frame.DrawTop = False
            Frame.DrawBottom = False
            Frame.DrawLeft = False
            Frame.DrawRight = False
            Size.Values = (
              44.9791666666667
              42.3333333333333
              21.1666666666667
              182.5625)
            Alignment = taLeftJustify
            AlignToBand = False
            AutoSize = True
            AutoStretch = False
            Color = clWhite
            DataSet = Qpec
            DataField = 'DATE_PEC'
            Transparent = False
            WordWrap = True
            FontSize = 10
          end
          object QRDBText3: TQRDBText
            Left = 96
            Top = 8
            Width = 45
            Height = 17
            Frame.Color = clBlack
            Frame.DrawTop = False
            Frame.DrawBottom = False
            Frame.DrawLeft = False
            Frame.DrawRight = False
            Size.Values = (
              44.9791666666667
              254
              21.1666666666667
              119.0625)
            Alignment = taLeftJustify
            AlignToBand = False
            AutoSize = True
            AutoStretch = False
            Color = clWhite
            DataSet = Qpec
            DataField = 'CLIENT'
            Transparent = False
            WordWrap = True
            FontSize = 10
          end
          object QRDBText4: TQRDBText
            Left = 288
            Top = 8
            Width = 46
            Height = 17
            Frame.Color = clBlack
            Frame.DrawTop = False
            Frame.DrawBottom = False
            Frame.DrawLeft = False
            Frame.DrawRight = False
            Size.Values = (
              44.9791666666667
              762
              21.1666666666667
              121.708333333333)
            Alignment = taLeftJustify
            AlignToBand = False
            AutoSize = True
            AutoStretch = False
            Color = clWhite
            DataSet = Qpec
            DataField = 'REVUE'
            Transparent = False
            WordWrap = True
            FontSize = 10
          end
          object QRDBText5: TQRDBText
            Left = 496
            Top = 8
            Width = 30
            Height = 17
            Frame.Color = clBlack
            Frame.DrawTop = False
            Frame.DrawBottom = False
            Frame.DrawLeft = False
            Frame.DrawRight = False
            Size.Values = (
              44.9791666666667
              1312.33333333333
              21.1666666666667
              79.375)
            Alignment = taLeftJustify
            AlignToBand = False
            AutoSize = True
            AutoStretch = False
            Color = clWhite
            DataSet = Qpec
            DataField = 'NUM'
            Transparent = False
            WordWrap = True
            FontSize = 10
          end
          object QRDBText6: TQRDBText
            Left = 16
            Top = 32
            Width = 43
            Height = 17
            Frame.Color = clBlack
            Frame.DrawTop = False
            Frame.DrawBottom = False
            Frame.DrawLeft = False
            Frame.DrawRight = False
            Size.Values = (
              44.9791666666667
              42.3333333333333
              84.6666666666667
              113.770833333333)
            Alignment = taLeftJustify
            AlignToBand = False
            AutoSize = True
            AutoStretch = False
            Color = clWhite
            DataSet = Qpec
            DataField = 'NB_FR'
            Transparent = False
            WordWrap = True
            FontSize = 10
          end
          object QRDBText7: TQRDBText
            Left = 16
            Top = 56
            Width = 42
            Height = 17
            Frame.Color = clBlack
            Frame.DrawTop = False
            Frame.DrawBottom = False
            Frame.DrawLeft = False
            Frame.DrawRight = False
            Size.Values = (
              44.9791666666667
              42.3333333333333
              148.166666666667
              111.125)
            Alignment = taLeftJustify
            AlignToBand = False
            AutoSize = True
            AutoStretch = False
            Color = clWhite
            DataSet = Qpec
            DataField = 'NB_ET'
            Transparent = False
            WordWrap = True
            FontSize = 10
          end
          object QRDBText8: TQRDBText
            Left = 16
            Top = 80
            Width = 50
            Height = 17
            Frame.Color = clBlack
            Frame.DrawTop = False
            Frame.DrawBottom = False
            Frame.DrawLeft = False
            Frame.DrawRight = False
            Size.Values = (
              44.9791666666667
              42.3333333333333
              211.666666666667
              132.291666666667)
            Alignment = taLeftJustify
            AlignToBand = False
            AutoSize = True
            AutoStretch = False
            Color = clWhite
            DataSet = Qpec
            DataField = 'NB_TOT'
            Transparent = False
            WordWrap = True
            FontSize = 10
          end
          object QRDBText9: TQRDBText
            Left = 288
            Top = 32
            Width = 105
            Height = 17
            Frame.Color = clBlack
            Frame.DrawTop = False
            Frame.DrawBottom = False
            Frame.DrawLeft = False
            Frame.DrawRight = False
            Size.Values = (
              44.9791666666667
              762
              84.6666666666667
              277.8125)
            Alignment = taLeftJustify
            AlignToBand = False
            AutoSize = True
            AutoStretch = False
            Color = clWhite
            DataSet = Qpec
            DataField = 'CP_ARECYCLER'
            Transparent = False
            WordWrap = True
            FontSize = 10
          end
          object QRDBText10: TQRDBText
            Left = 288
            Top = 56
            Width = 105
            Height = 17
            Frame.Color = clBlack
            Frame.DrawTop = False
            Frame.DrawBottom = False
            Frame.DrawLeft = False
            Frame.DrawRight = False
            Size.Values = (
              44.9791666666667
              762
              148.166666666667
              277.8125)
            Alignment = taLeftJustify
            AlignToBand = False
            AutoSize = True
            AutoStretch = False
            Color = clWhite
            DataSet = Qpec
            DataField = 'CP_RECYCLEES'
            Transparent = False
            WordWrap = True
            FontSize = 10
          end
          object QRDBText11: TQRDBText
            Left = 496
            Top = 32
            Width = 114
            Height = 17
            Frame.Color = clBlack
            Frame.DrawTop = False
            Frame.DrawBottom = False
            Frame.DrawLeft = False
            Frame.DrawRight = False
            Size.Values = (
              44.9791666666667
              1312.33333333333
              84.6666666666667
              301.625)
            Alignment = taLeftJustify
            AlignToBand = False
            AutoSize = True
            AutoStretch = False
            Color = clWhite
            DataSet = Qpec
            DataField = 'ADR_ARECYCLER'
            Transparent = False
            WordWrap = True
            FontSize = 10
          end
          object QRDBText12: TQRDBText
            Left = 496
            Top = 56
            Width = 114
            Height = 17
            Frame.Color = clBlack
            Frame.DrawTop = False
            Frame.DrawBottom = False
            Frame.DrawLeft = False
            Frame.DrawRight = False
            Size.Values = (
              44.9791666666667
              1312.33333333333
              148.166666666667
              301.625)
            Alignment = taLeftJustify
            AlignToBand = False
            AutoSize = True
            AutoStretch = False
            Color = clWhite
            DataSet = Qpec
            DataField = 'ADR_RECYCLEES'
            Transparent = False
            WordWrap = True
            FontSize = 10
          end
        end
        object QRSubDetail1: TQRSubDetail
          Left = 38
          Top = 225
          Width = 718
          Height = 40
          Frame.Color = clBlack
          Frame.DrawTop = False
          Frame.DrawBottom = False
          Frame.DrawLeft = False
          Frame.DrawRight = False
          AlignToBottom = False
          Color = clWhite
          ForceNewColumn = False
          ForceNewPage = False
          Size.Values = (
            105.833333333333
            1899.70833333333)
          Master = QuickRep1
          DataSet = QryDEDUP
          PrintBefore = False
          PrintIfEmpty = True
          object QRDBText13: TQRDBText
            Left = 32
            Top = 8
            Width = 87
            Height = 17
            Frame.Color = clBlack
            Frame.DrawTop = False
            Frame.DrawBottom = False
            Frame.DrawLeft = False
            Frame.DrawRight = False
            Size.Values = (
              44.9791666666667
              84.6666666666667
              21.1666666666667
              230.1875)
            Alignment = taLeftJustify
            AlignToBand = False
            AutoSize = True
            AutoStretch = False
            Color = clWhite
            DataSet = QryDEDUP
            DataField = 'DATE_DEDUP'
            Transparent = False
            WordWrap = True
            FontSize = 10
          end
          object QRDBText14: TQRDBText
            Left = 128
            Top = 8
            Width = 46
            Height = 17
            Frame.Color = clBlack
            Frame.DrawTop = False
            Frame.DrawBottom = False
            Frame.DrawLeft = False
            Frame.DrawRight = False
            Size.Values = (
              44.9791666666667
              338.666666666667
              21.1666666666667
              121.708333333333)
            Alignment = taLeftJustify
            AlignToBand = False
            AutoSize = True
            AutoStretch = False
            Color = clWhite
            DataSet = QryDEDUP
            DataField = 'NB_FIC'
            Transparent = False
            WordWrap = True
            FontSize = 10
          end
          object QRDBText15: TQRDBText
            Left = 192
            Top = 8
            Width = 78
            Height = 17
            Frame.Color = clBlack
            Frame.DrawTop = False
            Frame.DrawBottom = False
            Frame.DrawLeft = False
            Frame.DrawRight = False
            Size.Values = (
              44.9791666666667
              508
              21.1666666666667
              206.375)
            Alignment = taLeftJustify
            AlignToBand = False
            AutoSize = True
            AutoStretch = False
            Color = clWhite
            DataSet = QryDEDUP
            DataField = 'NB_ENTREE'
            Transparent = False
            WordWrap = True
            FontSize = 10
          end
          object QRDBText16: TQRDBText
            Left = 280
            Top = 8
            Width = 73
            Height = 17
            Frame.Color = clBlack
            Frame.DrawTop = False
            Frame.DrawBottom = False
            Frame.DrawLeft = False
            Frame.DrawRight = False
            Size.Values = (
              44.9791666666667
              740.833333333333
              21.1666666666667
              193.145833333333)
            Alignment = taLeftJustify
            AlignToBand = False
            AutoSize = True
            AutoStretch = False
            Color = clWhite
            DataSet = QryDEDUP
            DataField = 'NB_SORTIE'
            Transparent = False
            WordWrap = True
            FontSize = 10
          end
          object QRLabel1: TQRLabel
            Left = 416
            Top = 8
            Width = 58
            Height = 25
            Frame.Color = clBlack
            Frame.DrawTop = False
            Frame.DrawBottom = False
            Frame.DrawLeft = False
            Frame.DrawRight = False
            Size.Values = (
              66.1458333333333
              1100.66666666667
              21.1666666666667
              153.458333333333)
            Alignment = taLeftJustify
            AlignToBand = False
            AutoSize = True
            AutoStretch = False
            Caption = 'QRLabel1'
            Color = clWhite
            Transparent = False
            WordWrap = True
            FontSize = 10
          end
        end
      end
      object DsPEC: TDataSource
        DataSet = Qpec
        Left = 856
        Top = 16
      end
      object QryROUT: TQuery
        Active = True
        DatabaseName = 'mediapost'
        SessionName = 'SessionMediapost'
        DataSource = DsPEC
        SQL.Strings = (
          'select * from '
     
            '(select ID,convert(char(10),DATE_ROUT,103) as DATE_ROUT,LOG_ROUT' +
            '.TYPE,POIDS,LOG_ROUT.NB_TOT as NB_ROUT,NB_SAC,IMPRESSION'
          'from LOG_ROUT'
          'where LOG_ROUT.OK = 1'
          'union'
     
            'select ID,convert(char(10),DATE_MULTI,103) as DATE_ROUT,LOG_MULT' +
            'I.TYPE,'#39#39' as POIDS,LOG_MULTI.NB_ETIQ as NB_ROUT,'#39#39' as NB_SAC,IMP' +
            'RESSION'
          'from LOG_MULTI'
          'where LOG_MULTI.OK = 1) A'
     
            'where A.DATE_ROUT >= '#39'01/01/2005'#39' and A.DATE_ROUT <= '#39'31/12/2005' +
            #39
          'order by A.ID,A.DATE_ROUT')
        Left = 816
        Top = 80
      end
      object Qpec: TQuery
        Active = True
        DatabaseName = 'mediapost'
        SessionName = 'SessionMediapost'
        SQL.Strings = (
     
            'select LOG_JOB.ID, convert(char(10),DATE_PEC,103) as DATE_PEC,CL' +
            'IENT,REVUE,NUM,COMMENTAIRE,TYPE,CP_ARECYCLER,CP_RECYCLEES,ADR_AR' +
            'ECYCLER,ADR_RECYCLEES,NB_TOT,NB_ET,NB_FR'
          'from LOG_PEC'
          'inner join LOG_JOB on LOG_PEC.ID = LOG_JOB.ID'
          'where OK = 1'
          'order by LOG_JOB.ID')
        Left = 816
        Top = 16
      end
      object QryDEDUP: TQuery
        DatabaseName = 'mediapost'
        SessionName = 'SessionMediapost'
        DataSource = DsPEC
        SQL.Strings = (
          'select * from LOG_DEDUP'
          'where OK = 1'
          'order by ID')
        Left = 816
        Top = 48
      end
    end

  10. #10
    Membre chevronné Avatar de Oluha
    Profil pro
    Inscrit en
    Novembre 2004
    Messages
    2 183
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations forums :
    Inscription : Novembre 2004
    Messages : 2 183
    Points : 1 967
    Points
    1 967
    Par défaut
    c'est en progrès !
    Maintenant il m'affiche bien les valeurs du sous détail mais il ne m'affiche que le 1er élément alors qu'il devrait y en avoir 3 pour chaque PEC
    Quelqu'un aurait une idée d'où ça pourrait venir ?
    merci

  11. #11
    Modérateur
    Avatar de Rayek
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mars 2005
    Messages
    5 235
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : France, Haute Savoie (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mars 2005
    Messages : 5 235
    Points : 8 504
    Points
    8 504
    Par défaut
    Citation Envoyé par Oluha
    c'est en progrès !
    Maintenant il m'affiche bien les valeurs du sous détail mais il ne m'affiche que le 1er élément alors qu'il devrait y en avoir 3 pour chaque PEC
    Quelqu'un aurait une idée d'où ça pourrait venir ?
    merci
    Tu n'aurais pas oublié d'indiquer le champs de référence dans le sous détail ? (le champs sur lequel il va boucler pour chercher les autres resultats)
    Modérateur Delphi

    Le guide du bon forumeur :
    __________
    Rayek World : Youtube Facebook

  12. #12
    Membre chevronné Avatar de Oluha
    Profil pro
    Inscrit en
    Novembre 2004
    Messages
    2 183
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations forums :
    Inscription : Novembre 2004
    Messages : 2 183
    Points : 1 967
    Points
    1 967
    Par défaut
    possible, mais je ne vois pas où il faut l'indiquer

  13. #13
    Membre chevronné Avatar de Oluha
    Profil pro
    Inscrit en
    Novembre 2004
    Messages
    2 183
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations forums :
    Inscription : Novembre 2004
    Messages : 2 183
    Points : 1 967
    Points
    1 967
    Par défaut
    ah apparemment il m'avait viré la propriété dataset, maintenant c'est bon !

  14. #14
    Modérateur
    Avatar de Rayek
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mars 2005
    Messages
    5 235
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : France, Haute Savoie (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mars 2005
    Messages : 5 235
    Points : 8 504
    Points
    8 504
    Par défaut
    Je pourrais pas t'aider plus vu que je n'ai pas QR avec D2005, c'est des souvenirs de l'époque D5 ^^

    Normalement dans ta band details tu dois pouvoir sélectionner un champ du datasource, la, il faut que tu indiques celui qui va servir de référence.
    En clair celui qui va indiquer la fin du sous detail des qu'il va changer de valeur (L'id Pec par exemple)
    Modérateur Delphi

    Le guide du bon forumeur :
    __________
    Rayek World : Youtube Facebook

  15. #15
    Membre chevronné Avatar de Oluha
    Profil pro
    Inscrit en
    Novembre 2004
    Messages
    2 183
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations forums :
    Inscription : Novembre 2004
    Messages : 2 183
    Points : 1 967
    Points
    1 967
    Par défaut
    c'est nickel et en plus il m'affiche pas la bande quand la requête ne renvoit rien, c'est parfait !
    J'ai encore un petit truc à régler avant de mettre

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

Discussions similaires

  1. [Session] Ccrée plusieurs séssions avec groupes.
    Par dayou05 dans le forum Langage
    Réponses: 3
    Dernier message: 06/03/2015, 22h31
  2. Réponses: 8
    Dernier message: 09/01/2012, 09h45
  3. Réponses: 11
    Dernier message: 01/07/2010, 14h19
  4. Réponses: 12
    Dernier message: 23/04/2009, 14h53
  5. Rechercher fichiers avec un ou plusieurs groupes de mots
    Par Boubas1 dans le forum Windows XP
    Réponses: 6
    Dernier message: 23/09/2008, 23h04

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