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 :

File print pour un ODS PDF


Sujet :

ODS et reporting

  1. #1
    Membre du Club
    Homme Profil pro
    CONSULTANT DECISIONNEL BI
    Inscrit en
    Mai 2008
    Messages
    44
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Canada

    Informations professionnelles :
    Activité : CONSULTANT DECISIONNEL BI
    Secteur : Conseil

    Informations forums :
    Inscription : Mai 2008
    Messages : 44
    Points : 54
    Points
    54
    Par défaut File print pour un ODS PDF
    Bonjour,
    Depuis un moment nous avons un problème sur avec nos ODS PDF.
    Au fait on a des codes qui ont été développé il y'a de cela une dizaine d'années mais qui roulaient très bien jusqu'à la semaine dernière où on a soit des bizzareries dans les rapports (entêtes sans les données) soit le programme plante carrement. Après investigation je me suis rendu compte que c'est uniquement les programmes contenant un " FILE PRINT" qui produisent ce phénomène. J'ai demandé à notre équipe de TI (infras) de voir s'il y'a pas eut de mise à jour de Acrobat Rider ces temps-ci mais d'après elle tout est correct.
    Avez-vous une idée de ce qui peut provoquer cela?
    Merci d'avance.

    Le 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
    OPTIONS ORIENTATION=LANDSCAPE;
     
    %INCLUDE "&Chemin_Template\Style_maison.sas";
     
    ODS LISTING CLOSE;
    ODS PDF FILE="&Chemin\Nom_Rapprt.pdf" style=Style_maison;
     
    DATA _NULL_;
    FILE PRINT HEADER = NEWPAGE N = PS LINE = L LINESLEFT = LL LINESIZE=32767 ;
         SET RAPPORT;
         BY  CIE SERVICE BRANCHE GROUPE DESCENDING SOUSGR;
     
         IF FIRST.SOUSGR THEN PUT _PAGE_;
     
         IF MOISRAP = 199 THEN
            PUT // @5 'TOTAUX PAR ANNEE DE CALENDRIER';
     
         IF MOISRAP = 88 THEN
            PUT // @5 "VARIATION ENTRE %SUBSTR (&AU, 1, 4)"
                                  " ET %SUBSTR (&DU, 1, 4)";
     
         %CALCUL;
     
         IF MOISRAP = 77 THEN DO;
            %PRINT (2);
            END;
         ELSE DO;
            %PRINT (0);
            END;
     
         IF LAST.SOUSGR THEN
            PUT / @1 'NOTE: LES MONTANTS DE SINISTRES INCLUENT '
                     'LES FRAIS DE REGLEMENTS.';
     
         RETURN;
     
    NEWPAGE:
     
         IF BRANCHE = 'A' THEN RAPPORT = 'C08';
                          ELSE RAPPORT = 'C09';
     
         MOIS  = %SUBSTR (&AU, 5, 2);
         ANNEE = %SUBSTR (&AU, 1, 4);
         JOUR  = INTNX ('MONTH', MDY (MOIS, 01, ANNEE), 1);
         JOUR  = DAY (INTNX ('DAY', JOUR, -1));
     
         PUT     @1   'RAB ' RAPPORT +4 CIE $FCIE40.
             //  @40  'RAPPORT SUR LES SINISTRES VERSUS LES PRIMES AU '
                       JOUR
                       MOIS FMOIS.
                       ANNEE
             //  @10  'RAPPORTS DE PRODUCTION '
                 @50   SERVICE $FSERV.
                       BRANCHE $FBRAN.
                 @85
                  ;
     
         IF GROUPE NE 'T' AND GROUPE NE 'U' AND
            GROUPE NE 'Z' THEN PUT @85 'GROUPE ' @;
     
         PUT     @92   GROUPE $FGROU.
               / @92   NOM @;
     
         IF GROUPE NE 'U' AND GROUPE NE 'T'
            THEN PUT @106 "SOUS GROUPE " SOUSGR $SGR. @;
     
         SL = L + 2;
     
         PUT #SL @10  '   UNITES' / @10  '   SOUSCR'
             #SL @23  '    PRIME' / @23  '   SOUSCR'
             #SL @32  '    PRIME' / @32  '  MOYENNE' / @32  '   SOUSCR'
             #SL @42  '   UNITES' / @42  ' ACQUISES'
             #SL @55  '    PRIME' / @55  '  ACQUISE'
             #SL @64  '    PRIME' / @64  '  MOYENNE' / @64  '  ACQUISE'
             #SL @75  '   NOMBRE' / @75  ' DOSSIERS'
             #SL @88  '  MONTANT' / @88  'SINISTRES'
             #SL @97  ' COUT SIN' / @97  '  PAR UNI' / @97  '  ACQUISE'
             #SL @106 '     FREQ' / @106 '  PAR UNI' / @106 '  ACQUISE'
             #SL @115 '     COUT' / @115 '  MOY PAR' / @115 '  DOSSIER'
             #SL @124 '    RATIO' / @124 ' SINISTRE' / @124 '  PRI ACQ'
     
             #57 @35  'BLABLABLA NOM DE NOTRE BOITE '
             #59 @60  "BLABLABLA MON SERVICE"  #SL /;
     
         RETURN;
     
    RUN;
     
    ODS _ALL_ CLOSE;
    ODS LISTING;
    La Log

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    WARNING: LINESIZE=256 overrides LINESIZE value given for FILE PRINT.
    ERROR: More than 10 LINK operations have been executed at line 452 column 6 inside a HEADER= block. 
           Ensure that any FILE statement specifying the HEADER= option also references a file with the PRINT attribute, and check any 
           LINK/RETURN logic.
    L=7 LL=52 CIE=4 SERVICE=P BRANCHE=A GROUPE=001 SOUSGR=999 ANRAP=2011 MOISRAP=1 _TYPE_=127 _FREQ_=1 UNSOUS=62441.875 PRSOUS=23740887
    UNACQ=5317.1071429 PRACQ=1892322.0326 NBDOSS=753 MONTSIN=1375440.1206 PENR= USC= PSC= UAC= PAC= NDC= MSC= PRC= NOM=CSQ         CEN
    FIRST.CIE=1 LAST.CIE=0 FIRST.SERVICE=1 LAST.SERVICE=0 FIRST.BRANCHE=1 LAST.BRANCHE=0 FIRST.GROUPE=1 LAST.GROUPE=0 FIRST.SOUSGR=1
    LAST.SOUSGR=0 PRMOYS= PRMOYA= COUTSIN= FREQ= COUTMOY= RATIOSIN= RAPPORT=C08 MOIS=10 ANNEE=2012 JOUR=31 SL=9 _ERROR_=1 _N_=1
    NOTE: 240 lines were written to file PRINT.
    NOTE: The SAS System stopped processing this step because of errors.
    NOTE: There were 2 observations read from the data set WORK.RAPPORT.
    NOTE: DATA statement used (Total process time):
          real time           0.56 seconds
          cpu time            0.54 seconds

  2. #2
    Membre éclairé

    Femme Profil pro
    SAS FRANCE - Support Clients France et Europe
    Inscrit en
    Février 2010
    Messages
    289
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Activité : SAS FRANCE - Support Clients France et Europe
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Février 2010
    Messages : 289
    Points : 886
    Points
    886
    Par défaut
    Bonjour,

    Voici un extrait d'une ancienne note qui n'est plus en ligne:


    You may also receive this error message if the number of lines in the HEADER routine is greater than the value specified for PAGESIZE. To circumvent this problem, increase your PAGESIZE value.


    Peut-être que vos données ont évolué et que le pagesize est désormais trop juste. Vous pouvez déterminer sa taille actuelle en soumettant :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    proc options option=ps ;
    run ;
    Cordialement,
    Géraldine cade-Deschamps
    Support Clients SAS
    Cordialement,

    --
    Géraldine CADE-DESCHAMPS
    Consultante ▪ Support Clients SAS
    Tel: +33 1 60 62 12 12 ▪ support@sas.com
    www.sas.com/france
    SAS® … THE POWER TO KNOW®

  3. #3
    Membre du Club
    Homme Profil pro
    CONSULTANT DECISIONNEL BI
    Inscrit en
    Mai 2008
    Messages
    44
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Canada

    Informations professionnelles :
    Activité : CONSULTANT DECISIONNEL BI
    Secteur : Conseil

    Informations forums :
    Inscription : Mai 2008
    Messages : 44
    Points : 54
    Points
    54
    Par défaut
    Merci pour ta réponse Géraldine. Peut put être que ta solution marche mais au fait dans le code on faisait des put dans le dernier bloc qui en principe devrait être après ce bloc. Donc ma solution a été de decalé cela en le mettant dans un last.xxxxx avant le RETURN
    Voir la diférence dans les codes en rouge:

    Code Avant :

    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
    OPTIONS ORIENTATION=LANDSCAPE;
     
    %INCLUDE "&Chemin_Template\Style_maison.sas";
     
    ODS LISTING CLOSE;
    ODS PDF FILE="&Chemin\Nom_Rapprt.pdf" style=Style_maison;
     
    DATA _NULL_;
    FILE PRINT HEADER = NEWPAGE N = PS LINE = L LINESLEFT = LL LINESIZE=32767 ;
         SET RAPPORT;
         BY  CIE SERVICE BRANCHE GROUPE DESCENDING SOUSGR;
     
         IF FIRST.SOUSGR THEN PUT _PAGE_;
     
         IF MOISRAP = 199 THEN
            PUT // @5 'TOTAUX PAR ANNEE DE CALENDRIER';
     
         IF MOISRAP = 88 THEN
            PUT // @5 "VARIATION ENTRE %SUBSTR (&AU, 1, 4)"
                                  " ET %SUBSTR (&DU, 1, 4)";
     
         %CALCUL;
     
         IF MOISRAP = 77 THEN DO;
            %PRINT (2);
            END;
         ELSE DO;
            %PRINT (0);
            END;
     
         IF LAST.SOUSGR THEN
            PUT / @1 'NOTE: LES MONTANTS DE SINISTRES INCLUENT '
                     'LES FRAIS DE REGLEMENTS.';
     
         RETURN;
     
    NEWPAGE:
     
         IF BRANCHE = 'A' THEN RAPPORT = 'C08';
                          ELSE RAPPORT = 'C09';
     
         MOIS  = %SUBSTR (&AU, 5, 2);
         ANNEE = %SUBSTR (&AU, 1, 4);
         JOUR  = INTNX ('MONTH', MDY (MOIS, 01, ANNEE), 1);
         JOUR  = DAY (INTNX ('DAY', JOUR, -1));
     
         PUT     @1   'RAB ' RAPPORT +4 CIE $FCIE40.
             //  @40  'RAPPORT SUR LES SINISTRES VERSUS LES PRIMES AU '
                       JOUR
                       MOIS FMOIS.
                       ANNEE
             //  @10  'RAPPORTS DE PRODUCTION '
                 @50   SERVICE $FSERV.
                       BRANCHE $FBRAN.
                 @85
                  ;
     
         IF GROUPE NE 'T' AND GROUPE NE 'U' AND
            GROUPE NE 'Z' THEN PUT @85 'GROUPE ' @;
     
         PUT     @92   GROUPE $FGROU.
               / @92   NOM @;
     
         IF GROUPE NE 'U' AND GROUPE NE 'T'
            THEN PUT @106 "SOUS GROUPE " SOUSGR $SGR. @;
     
         SL = L + 2;
     
         PUT #SL @10  '   UNITES' / @10  '   SOUSCR'
             #SL @23  '    PRIME' / @23  '   SOUSCR'
             #SL @32  '    PRIME' / @32  '  MOYENNE' / @32  '   SOUSCR'
             #SL @42  '   UNITES' / @42  ' ACQUISES'
             #SL @55  '    PRIME' / @55  '  ACQUISE'
             #SL @64  '    PRIME' / @64  '  MOYENNE' / @64  '  ACQUISE'
             #SL @75  '   NOMBRE' / @75  ' DOSSIERS'
             #SL @88  '  MONTANT' / @88  'SINISTRES'
             #SL @97  ' COUT SIN' / @97  '  PAR UNI' / @97  '  ACQUISE'
             #SL @106 '     FREQ' / @106 '  PAR UNI' / @106 '  ACQUISE'
             #SL @115 '     COUT' / @115 '  MOY PAR' / @115 '  DOSSIER'
             #SL @124 '    RATIO' / @124 ' SINISTRE' / @124 '  PRI ACQ'
     
             #57 @35  'BLABLABLA NOM DE NOTRE BOITE '
             #59 @60  "BLABLABLA NOTRE SERVICE"  #SL /;
     
         RETURN;
     
    RUN;
     
    ODS _ALL_ CLOSE;
    ODS LISTING;
    Code Après:


    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
    OPTIONS ORIENTATION=LANDSCAPE;
     
    %INCLUDE "&Chemin_Template\Style_maison.sas";
     
    ODS LISTING CLOSE;
    ODS PDF FILE="&Chemin\Nom_Rapprt.pdf" style=Style_maison;
     
    DATA _NULL_;
    FILE PRINT HEADER = NEWPAGE N = PS LINE = L LINESLEFT = LL LINESIZE=32767 ;
         SET RAPPORT;
         BY  CIE SERVICE BRANCHE GROUPE DESCENDING SOUSGR;
     
         IF FIRST.SOUSGR THEN PUT _PAGE_;
     
         IF MOISRAP = 199 THEN
            PUT // @5 'TOTAUX PAR ANNEE DE CALENDRIER';
     
         IF MOISRAP = 88 THEN
            PUT // @5 "VARIATION ENTRE %SUBSTR (&AU, 1, 4)"
                                  " ET %SUBSTR (&DU, 1, 4)";
     
         %CALCUL;
     
         IF MOISRAP = 77 THEN DO;
            %PRINT (2);
            END;
         ELSE DO;
            %PRINT (0);
            END;
     
         IF LAST.SOUSGR THEN DO;
            PUT / @1 'NOTE: LES MONTANTS DE SINISTRES INCLUENT '
                     'LES FRAIS DE REGLEMENTS.';
    
    		PUT / @35  'BLABLABLA NOM DE NOTRE BOITE ' ;
            PUT / @60  "BLABLABLA NOTRE SERVICE";
    		END; 
         RETURN;
     
    NEWPAGE:
     
         IF BRANCHE = 'A' THEN RAPPORT = 'C08';
                          ELSE RAPPORT = 'C09';
     
         MOIS  = %SUBSTR (&AU, 5, 2);
         ANNEE = %SUBSTR (&AU, 1, 4);
         JOUR  = INTNX ('MONTH', MDY (MOIS, 01, ANNEE), 1);
         JOUR  = DAY (INTNX ('DAY', JOUR, -1));
     
         PUT     @1   'RAB ' RAPPORT +4 CIE $FCIE40.
             //  @40  'RAPPORT SUR LES SINISTRES VERSUS LES PRIMES AU '
                       JOUR
                       MOIS FMOIS.
                       ANNEE
             //  @10  'RAPPORTS DE PRODUCTION '
                 @50   SERVICE $FSERV.
                       BRANCHE $FBRAN.
                 @85
                  ;
     
         IF GROUPE NE 'T' AND GROUPE NE 'U' AND
            GROUPE NE 'Z' THEN PUT @85 'GROUPE ' @;
     
         PUT     @92   GROUPE $FGROU.
               / @92   NOM @;
     
         IF GROUPE NE 'U' AND GROUPE NE 'T'
            THEN PUT @106 "SOUS GROUPE " SOUSGR $SGR. @;
     
         SL = L + 2;
     
         PUT #SL @10  '   UNITES' / @10  '   SOUSCR'
             #SL @23  '    PRIME' / @23  '   SOUSCR'
             #SL @32  '    PRIME' / @32  '  MOYENNE' / @32  '   SOUSCR'
             #SL @42  '   UNITES' / @42  ' ACQUISES'
             #SL @55  '    PRIME' / @55  '  ACQUISE'
             #SL @64  '    PRIME' / @64  '  MOYENNE' / @64  '  ACQUISE'
             #SL @75  '   NOMBRE' / @75  ' DOSSIERS'
             #SL @88  '  MONTANT' / @88  'SINISTRES'
             #SL @97  ' COUT SIN' / @97  '  PAR UNI' / @97  '  ACQUISE'
             #SL @106 '     FREQ' / @106 '  PAR UNI' / @106 '  ACQUISE'
             #SL @115 '     COUT' / @115 '  MOY PAR' / @115 '  DOSSIER'
             #SL @124 '    RATIO' / @124 ' SINISTRE' / @124 '  PRI ACQ'
            #SL/;
     
         RETURN;
     
    RUN;
     
    ODS _ALL_ CLOSE;
    ODS LISTING;

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. ODS pdf file..messagebox 'SAVE'
    Par CyberMen dans le forum ODS et reporting
    Réponses: 1
    Dernier message: 14/11/2013, 12h45
  2. [ODS] ODS RTF - File print et taille de police
    Par polo92 dans le forum ODS et reporting
    Réponses: 2
    Dernier message: 14/10/2013, 14h19
  3. Réponses: 4
    Dernier message: 27/09/2012, 17h22
  4. Réponses: 12
    Dernier message: 02/06/2010, 16h37
  5. ODS Pdf pour charger deux pages avec un logo
    Par SASMetrics dans le forum ODS et reporting
    Réponses: 2
    Dernier message: 12/04/2010, 14h36

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