- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Let's suppose I want to put two tables on one page using ODS PDF. Each table is to have a different title. If I use this code, the second table's title doesn't appear (as shown in the attachment). What am I doing wrong?
ods pdf file="&cdu\temp.pdf" startpage=no; title "SASHELP.CARS"; title2 "First 10 Rows"; proc print data=sashelp.cars(obs=10); id make model; var msrp mpg_highway; run; title "SASHELP.CARS"; title2 "Second 10 Rows"; proc print data=sashelp.cars(firstobs=11 obs=20); id make model; var msrp mpg_highway; run; ods pdf close;
Paige Miller
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Maybe try ods text instead?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
ODS TEXT does function as a workaround but you'd have to customize the format/style which is annoying.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you @Miracle and @Reeza.
This now works
ods escapechar='^';
ods pdf file="&cdu\temp.pdf" startpage=no; ods pdf text = "^{style [just=center font=(Arial) fontsize=11pt fontweight=bold color=verydarkstrongblue] SASHELP.CARS}"; ods pdf text = "^{style [just=center font=(Arial) fontsize=11pt fontweight=bold color=verydarkstrongblue] First 10 Rows}"; proc print data=sashelp.cars(obs=10); id make model; var msrp mpg_highway; run; ods pdf text = "^{newline 2}"; ods pdf text = "^{style [just=center font=(Arial) fontsize=11pt fontweight=bold color=verydarkstrongblue] SASHELP.CARS}"; ods pdf text = "^{style [just=center font=(Arial) fontsize=11pt fontweight=bold color=verydarkstrongblue] 2nd 10 Rows}"; proc print data=sashelp.cars(firstobs=11 obs=20); id make model; var msrp mpg_highway; run; ods pdf close;
Okay, I went a little crazy with the style options, but when you have a new toy, you play with it ...
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Don't know if this is useful, but recently realized you can specify colours in SAS using
CX[HEXCOLOUR] which works great when trying to match company styles:
ods pdf text = "^{style [just=center font=(Arial) fontsize=11pt fontweight=bold color=Cx00aad2] First 10 Rows}";
%let cdu = C:\_localdata\temp;
ods escapechar='^';
ods pdf file="&cdu\temp.pdf" startpage=no;
ods pdf text = "^{style [just=center font=(Arial) fontsize=11pt fontweight=bold color=cxff7900] SASHELP.CARS}";
ods pdf text = "^{style [just=center font=(Arial) fontsize=11pt fontweight=bold color=cxd40072] First 10 Rows}";
proc print data=sashelp.cars(obs=10);
id make model;
var msrp mpg_highway;
run;
ods pdf text = "^{newline 2}";
ods pdf text = "^{style [just=center font=(Arial) fontsize=11pt fontweight=bold color=Cx00aad2] SASHELP.CARS}";
ods pdf text = "^{style [just=center font=(Arial) fontsize=11pt fontweight=bold color=Cx00aad2] 2nd 10 Rows}";
proc print data=sashelp.cars(firstobs=11 obs=20);
id make model;
var msrp mpg_highway;
run;
ods pdf close;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This is mostly off-topic, but how would I know what my company logo color is in CX notation?
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
My company has a corporate style guide courtesy of communications.
Another way is to go the to company website, use the web developer tools, check the CSS (cascading style sheet) for the colours used for common things, ie text, possibly logo, specific headings etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@PaigeMiller wrote:
This is mostly off-topic, but how would I know what my company logo color is in CX notation?
It may be easier to use CMYK if your organization has a Pantone Color look up somewhere for a printing documents.
The SAS color code would look like: CMYKccmmyykk where
mm is the magenta component.
yy is the yellow component.
kk is the black component.