BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
GreggB
Pyrite | Level 9

 I'm using PROC REPORT and outputting a pdf file using ODS. I want to preserve the blanks. For example, the 1 should be centered under Standard.

 

my output:

 

Capture.PNG

 

 

 

my footnote statements:

footnote1 height=9pt "Standard             Grade 3                        Grade 4–5                   Grade 6                Grade 7                Grade 8";
footnote2 height=9pt "    1           Number Sense and Base Ten      Number Sense and Base Ten   The Number System      The Number System      The Number System";

 

1 ACCEPTED SOLUTION

Accepted Solutions
SuzanneDorinski
Lapis Lazuli | Level 10

Usage Note 23332: Keeping leading and trailing blank spaces in titles and footnotes using ODS shows how to modify the style template.  I think you'll need to use a fixed width font to get the text to line up the way it's typed in the program editor.  

 

 

* http://support.sas.com/kb/23/332.html shows how to update style 
* template for HTML or RTF.  similar logic for PDF. ;

proc template;
  define style styles.modified_Pearl;
    parent=styles.Pearl;
    style systemfooter from systemfooter 
      "Style element responsible for footnotes" / 
        asis=on;
  end;
run;

options orientation=landscape nodate;

* probably need to use fixed width font on footnotes to get text to line up
* as intended. ;

ODS PDF FILE='/folders/myfolders/ODS PDF/PDF with blanks preserved in footnotes.PDF'
  style=modified_Pearl;

proc report data=sashelp.class nowd;
  columns name age sex height weight;
footnote1 font=Courier height=9pt "Standard           Grade 3                    Grade 4–5                 Grade 6             Grade 7             Grade 8     ";
footnote2 font=Courier height=9pt "    1      Number Sense and Base Ten   Number Sense and Base Ten   The Number System   The Number System   The Number System";
run;

ODS PDF CLOSE;

Screen shot of the footnotes with the blanks preserved in PDFScreen shot of the footnotes with the blanks preserved in PDF

View solution in original post

1 REPLY 1
SuzanneDorinski
Lapis Lazuli | Level 10

Usage Note 23332: Keeping leading and trailing blank spaces in titles and footnotes using ODS shows how to modify the style template.  I think you'll need to use a fixed width font to get the text to line up the way it's typed in the program editor.  

 

 

* http://support.sas.com/kb/23/332.html shows how to update style 
* template for HTML or RTF.  similar logic for PDF. ;

proc template;
  define style styles.modified_Pearl;
    parent=styles.Pearl;
    style systemfooter from systemfooter 
      "Style element responsible for footnotes" / 
        asis=on;
  end;
run;

options orientation=landscape nodate;

* probably need to use fixed width font on footnotes to get text to line up
* as intended. ;

ODS PDF FILE='/folders/myfolders/ODS PDF/PDF with blanks preserved in footnotes.PDF'
  style=modified_Pearl;

proc report data=sashelp.class nowd;
  columns name age sex height weight;
footnote1 font=Courier height=9pt "Standard           Grade 3                    Grade 4–5                 Grade 6             Grade 7             Grade 8     ";
footnote2 font=Courier height=9pt "    1      Number Sense and Base Ten   Number Sense and Base Ten   The Number System   The Number System   The Number System";
run;

ODS PDF CLOSE;

Screen shot of the footnotes with the blanks preserved in PDFScreen shot of the footnotes with the blanks preserved in PDF

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 3365 views
  • 1 like
  • 2 in conversation