Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Ajouter un nouveau label dans le bas de page

  • Ouvrir les propriétés “Summary”

    Image RemovedImage Added

  • Dans le “Summary editor définir

    • Summary running → Report

    • Summary function → Running Summary

    • Argument expression → [VeTeteDocum.ChildVE_LIGNE_DOCUM.Total ligne HT]

      Image RemovedImage Added

  • Définir le nom du champ avec “SousTotalFinDePage“ dans les propriétés

Ajouter le total reporté

  • Ajouter un nouveau label pour le titre du total reporté dans le haut de page

  • Lui donner un text et le nom “TotalReporteTitre“ dans les propriétés

    Image AddedImage Added

  • Ajouter un nouveau label pour le total reporté

  • Lui donner le nom “TotalReporte“ dans les propriétés

    Image Added

Ajouter le script

Ajouter le script suivant dans la section “Script” du rapport

Code Block
languagec#
using System.Linq;
using DevExpress.XtraPrinting;


private void XtraReport_AfterPrint(object sender, System.EventArgs e) {
    
           var TotalReporteBricks = BrickSelector.GetBricksByXRControl(this.PrintingSystem.Document, TotalReporte).ToList();
           var TotalReporteTitreBricks = BrickSelector.GetBricksByXRControl(this.PrintingSystem.Document, TotalReporteTitre).ToList();
           var SousTotalFinPageBricks = BrickSelector.GetBricksByXRControl(this.PrintingSystem.Document, SousTotalFinDePage).ToList();

           for (int i = 0; i < TotalReporteBricks.Count; i++)
           {
               
             if (i > 0 && SousTotalFinPageBricks.Count() > i-1 )
             {
                 TotalReporteBricks[i].Text = SousTotalFinPageBricks[i -1].Text;
             }
             else
             {
                 TotalReporteTitreBricks[i].IsVisible = false; 
                 TotalReporteBricks[i].IsVisible = false; 
             }
           }
}