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

ODS et reporting Discussion :

Proc report / Ne pas afficher l'ouput


Sujet :

ODS et reporting

  1. #1
    Nouveau Candidat au Club
    Homme Profil pro
    Développeur décisionnel
    Inscrit en
    Décembre 2012
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    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 : 1
    Points
    1
    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 : 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
    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.

  2. #2
    Nouveau Candidat au Club
    Homme Profil pro
    Développeur décisionnel
    Inscrit en
    Décembre 2012
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    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 : 1
    Points
    1
    Par défaut
    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 : 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
    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;

Discussions similaires

  1. Proc reg : ne pas afficher la selection pas à pas
    Par Tranche-taille dans le forum SAS STAT
    Réponses: 5
    Dernier message: 12/09/2014, 16h24
  2. proc report: la largeur de x ne se situe pas entre 1 et 123
    Par debdev dans le forum ODS et reporting
    Réponses: 2
    Dernier message: 20/05/2009, 12h50
  3. Réponses: 2
    Dernier message: 21/04/2009, 21h10
  4. Réponses: 0
    Dernier message: 26/05/2008, 11h20
  5. Afficher les espaces dans une PROC REPORT
    Par Fatah93 dans le forum ODS et reporting
    Réponses: 6
    Dernier message: 07/05/2008, 21h30

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