- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone!
I would like that wide report (9 columns) fit in landscape orientation. I use this code.
Unfortunately I have the message that word can be open.
Could you help me please?
Thank you very much!
option papersize=a3;
option nomprint nosymbolgen nomlogic nodate nonumber missing=0
orientation=portrait nocenter
topmargin=.15in
bottommargin=.15in
leftmargin=.15in rightmargin=.15in ;
ods word file="&Output\3. Publipostage\TEST\Loi.docx";
proc report data=tab_30 nowd
style(report)=[rules=groups frame = hsides background =white bordercolor=purple frame=void rules=none cellpadding=0 cellspacing=.15pt]
style(header)=[background = white font_size=8pt font_face = 'narrow' cellpadding=0 cellspacing=.15pt]
style(column)=[font_size = 8pt font_face='narrow' cellspacing=0 cellwidth = 2.5 cm cellpadding=0 cellspacing=.15pt ];
column Code_ISIN Nom_support "Société de gestion"n "Performance brute de l'actif N-1"n "Frais de gestion de l'actif"n "Performance nette de l'UC"n "Frais de gestion du contrat"n "Performance finale"n "Taux de rétrocessions de comm"n;
run;
ods word close;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Did you try
options orientation=landscape ;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
yes, same problem 😞
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
Remember that ODS WORD is pre-production. So you might want to try ODS RTF first. Then if you have working code for ODS RTF and ODS WORD does not work as expected, then you should open a track with Tech Support so they can verify your experience and confirm that it is not your data causing an issue. They'll check your specific version of SAS and be able to tell you whether this is something that is due to the pre-production status of ODS WORD or whether there is something else you can do. I would expect you'll find that your issue is due to a pre-production glitch either related to the style or the rendering or something internal. I tend to avoid pre-production features until they become production.
When I run THIS simplified version of your code in SAS 9.4M5 and M6 using ODS RTF, I can get 16 columns on the report. Note that I simplified the code by taking out the style(column) width and other settings and just let ODS RTF figure the column size and used the default font from the RTF style. Here's the code:
options papersize=a3 orientation=landscape nocenter
nomprint nosymbolgen nomlogic nodate nonumber missing=0
topmargin=.15in bottommargin=.15in
leftmargin=.15in rightmargin=.15in ;
ods rtf file="c:\temp\output\Loi_or.rtf";
proc report data=sashelp.class nowd
style(report)=[rules=groups frame=hsides width=100%
bordercolor=purple borderwidth=2pt
cellpadding=3px cellspacing=4px]
style(header)=[font_size=9pt just=c]
style(column)=[font_size=9pt just=c];
column ('Should be 16 cols'
name sex age height weight
sex age height weight
sex age height weight
name sex age);
run;
ods rtf close;
I also cleaned up the STYLE(REPORT) section to use the FRAME=HSIDES and the BORDERCOLOR of purple. and the output opened in Word:
Hope this helps. I encourage you to open a track with Tech Support to ask about ODS WORD and the behavior you're observing.
Cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Cynthia,
Yes, ods rtf works well!
Do you know the contact of Tech Support SAS?
Best regards,
Marie
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
You can fill out this form: http://support.sas.com/ctx/supportform/createForm to open a track.
Cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi MarieT and Cynthia,
Good question and testing on new ODS WORD. A lot of things can go wrong when an RTF file does not open. Sometimes it's your input data. For example, if you have a long string characters with unpaired {} or some other strange character that causes some other character lost.
Does anyone know how many columns SAS ODS RTF proc report support? Older version of Word supports 31, and the new Word supports 63. See the attached.
Best Regards
Jianmin Long