Dear all,
Is it possible to format the page number option in system option?
options nodate number nobyline
can I change the size, color, etc of the numbers printed?
Hi:
It is possible to change the page number formatting, but not, as you envision, in a system option. The page number is controlled by the style template used for the destination. So your options are:
1) turn page numbering off and use ODS ESCAPECHAR THISPAGE function in a title statement and use TITLE options to alter the page number
or
2) change the style template.
Both methods are shown below:
Method 1 -- use ODS ESCAPECHAR and TITLE statement
Method 2 -- use PROC TEMPLATE
I think that Method 1 is easier for beginners. For method 2 to work, the PAGENO style attribute had to be altered to add color and font in the template. And, the STYLE = option had to be added to the ODS PDF statement.
Hope this helps,
Cynthia
Hi:
It is possible to change the page number formatting, but not, as you envision, in a system option. The page number is controlled by the style template used for the destination. So your options are:
1) turn page numbering off and use ODS ESCAPECHAR THISPAGE function in a title statement and use TITLE options to alter the page number
or
2) change the style template.
Both methods are shown below:
Method 1 -- use ODS ESCAPECHAR and TITLE statement
Method 2 -- use PROC TEMPLATE
I think that Method 1 is easier for beginners. For method 2 to work, the PAGENO style attribute had to be altered to add color and font in the template. And, the STYLE = option had to be added to the ODS PDF statement.
Hope this helps,
Cynthia
Thankyou @Cynthia_sas ,
I tried that with this code
options nodate nonumber nobyline;
ods pdf file="test.pdf";
ods graphics /reset noborder width=10in height=8.5in ;
ods ecapechar='^';
title1 color=dimgray h=6pt bold j=r "Page ^{thispage} of ^{lastpage}";
title2 color=dimgray h=6pt bold j=c "My title";
proc sgpanel data=mydata;
........................;
run;
title1;
title2;
ods pdf close;
but am not getting the desired results:
this is what I get:
the number is not displayed
Hi: Sorry, I must have missed that you were doing graphics. Method 1 worked for me when I did this:
You have to use the ODS PDF option to allow ODS to control the title. It is just NOGTITLE (which says don't put the title inside the graph, put it outside the graph in the ODS file).
Cynthia
@Cynthia_sas The second method worked for me thankyou
@Cynthia_sas thankyou
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.