Bonjour,

Lorsque je crée et utilise des styles destinés à des fichiers pdf comme dans le code suivant, tout se passe bien avec SAS 9.1, mais j'obtiens l'erreur suivante lorsque j'éxécute ods rtf avec SAS 9.2 :
WARNING: Could not locate parent style element "cellcontents" for element "rtf_temp_l.line".


Est-ce que le style styles.rtf aurait changé entre les deux versions de SAS, ou le problème vient-il d'autre part ? Auriez-vous des idées ?

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
 
   proc template;
       DEFINE STYLE rtf_temp_l; 
   PARENT =styles.rtf; 
   %** important thing to notice is the protectspecialchars, which allows us to push the RTF codes through **; 
   STYLE table FROM table / rules=groups frame=hsides cellspacing=0 
                            outputwidth =_undef_ protectspecialchars=off; 
 
   %** these are the IRDDS margins for A4 landscape.  
       Other margin sizes can be set using different styles **; 
   REPLACE Body FROM Document / 
 
      bottommargin = 1.98cm
      topmargin    = 3.00cm
      rightmargin  = 2.01cm
      leftmargin   = 3.81cm;
 
   REPLACE data from cell / 
         background = colors('contentbg'); 
 
	   STYLE line FROM cellcontents/ 
       font       = fonts('CellFont') 
       CELLSPACING = 0 
       CELLWIDTH   = 40cm 
       CELLPADDING = 0 
       BACKGROUND  = black 
       CELLHEIGHT  = 5; 
 
      end;
   run;
 
   ods rtf file="test.rtf" style=rtf_temp_l;
 
   proc print data=sashelp.class;
      title '\ul\ql this is the first \line this is the second';
   run;
 
   ods rtf close;
Merci d'avance,
Julien V.