Précédent   Forum du club des développeurs et IT Pro > Logiciels > Solutions d'entreprise > Business Intelligence > SAS > ODS et reporting
ODS et reporting Forum d'entraide sur les fonctionnalités de reporting de SAS : gérer les sorties et graphiques de SAS
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse
 
Outils de la discussion
Publicité
'
Vieux 28/12/2012, 12h43   #1
christop
Invité de passage
 
Homme Christophe
Développeur décisionnel
Inscription : décembre 2012
Messages : 2
Détails du profil
Informations personnelles :
Nom : Homme Christophe
Localisation : France, Hauts de Seine (Île de France)

Informations professionnelles :
Activité : Développeur décisionnel
Secteur : Finance

Informations forums :
Inscription : décembre 2012
Messages : 2
Points : 0
Points : 0
Par défaut Proc report / Ne pas afficher l'ouput

Bonjour,

je débute dans les ODS, je souhaite extraire une table SAS sur Excel selon certaines conditions de mise en page.
J'ai fait un test sur une petite table qui marche.

Cependant, je n'arrive pas à ne pas afficher l'ouput de la proc report.

J'ai bien testé l'option nowd, comme ceci :
1/ proc report data = ab nowd
et comme ceci :
2/ proc report data = ab nowd

L'ouput affiche malgré tout le résultat de la proc report.

J'ai la version sas9.1.

Voici mon code :

Code :
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
ods tagsets.excelxp file="\ods\bibou.xls"
;
 
ods tagsets.excelxp
options(sheet_name= "Valeurs")
options (frozen_headers = "Yes
options(FRAME="BOX") ;
 
proc report  data = ab nowd
   style(report)=[rules=rows                                                             frame=box 
                       bordercolor=black 
             borderwidth = 2cm]
   style(header)=[font_weight=bold                       
                         foreground=black                       
                         rules=rows            
               frame=box
                         bordercolor=black
                         borderwidth = 2cm
                         background  = white]                 
   style(column)=[  rules=rows                                     frame=box
                    bordercolor=black 
                 borderwidth = 2cm                                                       background  = white];
 
      columns nom age;
      define nom    / display "Nom" style(column)=[cellwidth=3cm] style(column)=[FRAME=BOX]
;
      define age    / display "Age de lagent" style(column)=[cellwidth=3cm] ; 
 
compute age;
if age<0 then call define ("age","style","style=[ foreground=red ]");
endcomp;
 
      run;
 
ods tagsets.excelxp close;
Merci d'avance.
Christophe.
christop est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 28/12/2012, 16h57   #2
christop
Invité de passage
 
Homme Christophe
Développeur décisionnel
Inscription : décembre 2012
Messages : 2
Détails du profil
Informations personnelles :
Nom : Homme Christophe
Localisation : France, Hauts de Seine (Île de France)

Informations professionnelles :
Activité : Développeur décisionnel
Secteur : Finance

Informations forums :
Inscription : décembre 2012
Messages : 2
Points : 0
Points : 0
Avec l'option ODS _ALL_ CLOSE, cela marche lorsque j'exporte une table de 10 lignes.

Lorque j'exporte ma vrai table de 25 000 lignes en ajoutant cette option, quand dans la LOG, SAS commence à traiter l'ODS l'export ne se réalise toujours pas au bout de 20 minutes.

Est ce du au nombre de lignes ?
Ce programme devrait crée deux onglets :
un de 600 lignes (synthèse) un autre de 25000 lignes détail.

Cela marche avec la proc export mais sans la mise en page et les couleurs.

Voici mon code :


Code :
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
ODS _ALL_ CLOSE ;
 
ods tagsets.excelxp file="H:\Dbs\Vtsa\demande cadi infocentre\validees en CADI\suivi activite\2012 CADI\CADI-2012-09-DPVP-2\Export excel\POUR_TEST_ODS.xls"
;
 
 
ods tagsets.excelxp
options(sheet_name= "Détail")/*Nom de l'onglet*/ 
options (frozen_headers = "Yes")/*Première ligne figée*/
;
 
 
proc report DATA = Modesi.diffusion  nowd
   style(report)=[rules=rows                                      /*rules, frame, bordercolor et borderwitth sont des options de bordures*/
				  frame=box 
                  bordercolor=black 
				  borderwidth = 2cm]
   style(header)=[  font_weight=bold     /*Agit sur la première ligne*/   /*Police en gras*/
					foreground=black      /*Couleur de la police*/
					rules=rows            
					frame=box
                    bordercolor=black                              /*Tout le cadre exterieur bordure*/
					borderwidth = 2cm
					background  = white]                           /*Couleur de fond de la cellule*/
   style(COLUMN)=[  rules=rows             /* Agit sur toutes les lignes sauf la première*/
					frame=box
   				    bordercolor=black 
					borderwidth = 2cm                              /* Epaisseur de la bordure*/
					background  = white]
;
      COLUMNS Reseau Nom_region DR Nom_IRV IRV Nom_agent RRI nom_beneficiaire code_beneficiaire produits Libelle_produit 
serie contrat Versement_Client  montant_frais taux_frais date_effet_mvt date_creation_mvt Taux_Commission Commission 
tx_surcom_actuel montant_surcom tx_com_std  com_std tx_com_si  com_si  tauxsi  commission_estime 
;
      define Reseau   / display "Nom" style(COLUMN)=[cellwidth=3cm] style(COLUMN)=[FRAME=BOX]style(COLUMN)=[cellwidth=3cm];
      define Nom_region    / display "A" style(COLUMN)=[cellwidth=3cm] ; 
	  define DR    / display "B" style(COLUMN)=[cellwidth=3cm] ; 
	  define Nom_IRV    / display "c" style(COLUMN)=[cellwidth=3cm] ; 
	  define IRV    / display "d" style(COLUMN)=[cellwidth=3cm] ; 
	  define Nom_agent    / display "e" style(COLUMN)=[cellwidth=3cm] ; 
	  define RRI    / display "f" style(COLUMN)=[cellwidth=3cm] ; 
	  define nom_beneficiaire    / display "g" style(COLUMN)=[cellwidth=3cm] ; 
	  define code_beneficiaire    / display "h" style(COLUMN)=[cellwidth=3cm] ; 
	  define produits    / display "i" style(COLUMN)=[cellwidth=3cm] ; 
	  define Libelle_produit    / display "j" style(COLUMN)=[cellwidth=3cm] ; 
	  define serie    / display "k" style(COLUMN)=[cellwidth=3cm] ; 
	  define contrat   / display "l" style(COLUMN)=[cellwidth=3cm] ; 
	  define Versement_Client    / display "m" style(COLUMN)=[cellwidth=3cm] ; 
	  define montant_frais    / display "m" style(COLUMN)=[cellwidth=3cm] ; 
	  define taux_frais    / display "o" style(COLUMN)=[cellwidth=3cm] ; 
	  define date_effet_mvt    / display "p" style(COLUMN)=[cellwidth=3cm] ; 
	  define date_creation_mvt    / display "q" style(COLUMN)=[cellwidth=3cm] ; 
	  define Taux_Commission     / display "r" style(COLUMN)=[cellwidth=3cm] ; 
	  define Commission    / display "s" style(COLUMN)=[cellwidth=3cm] ; 
	  define tx_surcom_actuel    / display "t" style(COLUMN)=[cellwidth=3cm] ; 
	  define montant_surcom    / display "u" style(COLUMN)=[cellwidth=3cm] ; 
	  define tx_com_std    / display "v" style(COLUMN)=[cellwidth=3cm] ; 
	  define com_std    / display "w" style(COLUMN)=[cellwidth=3cm] ; 
	  define tx_com_si     / display "x" style(COLUMN)=[cellwidth=3cm] ; 
	  define com_si    / display "y" style(COLUMN)=[cellwidth=3cm] ; 
	  define tauxsi     / display "z" style(COLUMN)=[cellwidth=3cm] ; 
	  define commission_estime    / display "aa" style(COLUMN)=[cellwidth=3cm] ; 
 
      run;
 
ods tagsets.excelxp
options(sheet_name= "Synthèse")/*Nom de l'onglet*/ 
options (frozen_headers = "Yes")/*Première ligne figée*/
;
 
 
 proc report DATA = Modesi.diffusion2  nowd
   style(report)=[rules=rows                                      /*rules, frame, bordercolor et borderwitth sont des options de bordures*/
				  frame=box 
                  bordercolor=black 
				  borderwidth = 2cm]
   style(header)=[  font_weight=bold     /*Agit sur la première ligne*/   /*Police en gras*/
					foreground=black      /*Couleur de la police*/
					rules=rows            
					frame=box
                    bordercolor=black                              /*Tout le cadre exterieur bordure*/
					borderwidth = 2cm
					background  = white]                           /*Couleur de fond de la cellule*/
   style(COLUMN)=[  rules=rows             /* Agit sur toutes les lignes sauf la première*/
					frame=box
   				    bordercolor=black 
					borderwidth = 2cm                              /* Epaisseur de la bordure*/
					background  = white]
;
      COLUMNS Reseau	Nom_region	DR	Nom_IRV	IRV	Nom_agent	RRI nom_beneficiaire code_beneficiaire
Commission montant_surcom commission_estime Ecart_retenu Ecart;
      define Reseau    / display "a" style(COLUMN)=[cellwidth=3cm] style(COLUMN)=[FRAME=BOX]style(COLUMN)=[cellwidth=3cm];
      define Nom_region    / display "b" style(COLUMN)=[cellwidth=3cm] ; 
	  define DR   / display "c" style(COLUMN)=[cellwidth=3cm] ; 
	  define Nom_IRV    / display "d" style(COLUMN)=[cellwidth=3cm] ; 
	  define IRV    / display "e" style(COLUMN)=[cellwidth=3cm] ; 
	  define Nom_agent   / display "f" style(COLUMN)=[cellwidth=3cm] ; 
	  define RRI    / display "g" style(COLUMN)=[cellwidth=3cm] ; 
	  define nom_beneficiaire    / display "h" style(COLUMN)=[cellwidth=3cm] ; 
	  define code_beneficiaire    / display "i" style(COLUMN)=[cellwidth=3cm] ; 
	  define Commission    / display "j" style(COLUMN)=[cellwidth=3cm] ; 
	  define montant_surcom    / display "k" style(COLUMN)=[cellwidth=3cm] ; 
	  define commission_estime    / display "l" style(COLUMN)=[cellwidth=3cm] ; 
	  define Ecart_retenu    / display "m" style(COLUMN)=[cellwidth=3cm] ; 
	  define Ecart    / display "n" style(COLUMN)=[cellwidth=3cm] ; 
 
 
 
compute Ecart;
IF Ecart<0 then call define ("Ecart","style","style=[ foreground=red ]");
endcomp;
 
      run;
 
ods tagsets.excelxp close;
christop est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse
Outils de la discussion

Navigation rapide


Fuseau horaire GMT +2. Il est actuellement 11h05.


 
 
 
 
Partenaires

Hébergement Web