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

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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