** ****************************************************************************************** * **EndUser4gl ** ******************************************************************************************* ** SORT AND REPORT ******************************************** ** #include "c:\EndUser4gl\4gl\hlp\IncludeSysEU\includesyseu.h" char : fileInput:255 := "c:\EndUser4gl\4gl\hlp\InstructionsReport\commande.txt" , fileOuput:255 := "c:\EndUser4gl\4gl\hlp\DataFile\outq\Sortreportforme1.wri"; struct : DataCde { char NumClient:5; char Name:5; char town:12; char code :5; char country:8; char codep:4; char endenreg:2; ** return_carriage } Sortinput "c:\EndUser4gl\4gl\hlp\InstructionsReport\commande.txt" length=39 by char posit 28 to 35 , by char posit 6 to 10 Sortoutput "c:\EndUser4gl\4gl\hlp\DataFile\outq\sortcommande.txt" use return_carriage; ** LE FICHIER en entrée doit etre TRIE Begin_Report ReportInput "c:\EndUser4gl\4gl\hlp\DataFile\outq\sortcommande.txt" from dataCde Reportoutput fileouput level by DataCde.Country by DataCde.name HEADER_REPORT print date column 50, time column 62 ; print " ------------------------------------------------------------------------ "; print " : Entete Etat : "; print " : Liste des Clients ou Vendors by Country/Pays : "; print " ------------------------------------------------------------------------ "; END_HEADER_REPORT HEADER_LEVEL : 01 ** level : 01 ,02,03 etc.. print "*********************************************************************************"; print "*RUPTURE NIVEAU/LEVEL : Country :", Level ,"Key...:", level_key,"Name ..:", DataCde.Country ; print "*"; print "*" ; print "*********************************************************************************"; END_HEADER_LEVEL DETAIL begin print " Line Détail ....",DataCde.name , " NumClient :",DataCde.NumClient," town ..",DataCde.town ; end_begin ; END_DETAIL BREAK_END_LEVEL : 01 print "--------------------------------------------------------------------------------"; print " Fin de groupe /Level:" level column 2,"total data" column 42,total_level column 60,"Key ", level_key column 75 ; print "--------------------------------------------------------------------------------"; END_BREAK_END_LEVEL End_Report ; SetColorText (HWDISPLAY:blue,white) ; Display " Reporting" ; display ""; SetColorText (HWDISPLAY:yellow,red) ; Display " Sortinput c:\EndUser4gl\4gl\hlp\DataFile\commande.txt" ; Display " Sortoutput c:\EndUser4gl\4gl\hlp\DataFile\outq\Sortreportforme1.wri" ; SysCommandWindows("write.exe c:\EndUser4gl\4gl\hlp\DataFile\outq\sortcommande.txt" ) ; SysCommandWindows("write.exe c:\EndUser4gl\4gl\hlp\DataFile\outq\Sortreportforme1.wri" ) ;