ODS LISTING CLOSE ; PROC SORT DATA = livre.voitures OUT = work.voitures ; BY constructeur modele ; RUN ; ODS PDF FILE = "c:\temp\data _null_.pdf" ; DATA _NULL_ ; SET work.voitures (DROP = ventes) END=fin ; BY constructeur ; ARRAY caracteristiques _NUMERIC_ ; IF _N_=1 THEN DECLARE ODSOUT listing () ; /* initialisation */ IF FIRST.constructeur THEN DO ; listing.TABLE_START(OVERRIDES:"FRAME=VOID RULES=NONE") ; listing.ROW_START() ; listing.FORMAT_CELL(TEXT:CATX(" ","Extrait de la gamme",constructeur,"..."), OVERRIDES:"BACKGROUND=BLACK FOREGROUND=WHITE") ; listing.ROW_END() ; listing.TABLE_END() ; listing.IMAGE(TEXT:CATS("c:\temp\img\",LOWCASE(constructeur),".gif")) ; END ; listing.TABLE_START() ; listing.ROW_START() ; listing.FORMAT_CELL(TEXT:CAT("Modèle : ",STRIP(constructeur)," ",modele), COLUMN_SPAN:4, OVERRIDES:"JUST=C BACKGROUND=GRAY FONT_WEIGHT=BOLD BOTTOMMARGIN=2mm") ; listing.ROW_END() ; DO i=1 TO DIM(caracteristiques) ; IF MOD(i,2)=1 THEN listing.ROW_START() ; listing.FORMAT_CELL(TEXT:VLABEL(caracteristiques(i))) ; listing.FORMAT_CELL(TEXT:PUTN(caracteristiques(i), VFORMAT(caracteristiques(i)))) ; IF MOD(i,2)=0 THEN listing.ROW_END() ; END ; listing.TABLE_END() ; IF NOT LAST.constructeur THEN listing.LINE() ; IF LAST.constructeur AND NOT fin THEN listing.PAGE() ; RUN ; ODS PDF CLOSE ; ODS LISTING ;