BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Sarah-R
Obsidian | Level 7

Does anyone know how to 

add a line above the report, but below the titles, in Proc Report?

 

I need to add an italicized line that says, "All subjects".

 

When I use the

compute before _page_;

@1   "All subjects";

endcomp;

 it shows at the top of every page.  I need it to show only at the top of the first page.

 

Any help would be greatly appreciated.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Sarah-R
Obsidian | Level 7

Use the following compute before block, with the variable-that-contains-top-of-page-text to be blank for the pages after the first page:

 

compute before _page_;

    line @1   variable-that-contains-top-of-page-text;

endcomp;

View solution in original post

3 REPLIES 3
Sarah-R
Obsidian | Level 7

Does anyone know how to 

add a line above the report, but below the titles, in Proc Report?

 

I need to add an italicized line that says, "All subjects".

 

When I use the

compute before _page_;

    line @1   "All subjects";

endcomp;

 it shows at the top of every page.  I need it to show only at the top of the first page.

 

Any help would be greatly appreciated.

ballardw
Super User

You might try a style setting such as this.

 

proc report data=sashelp.class
   style(report)=[pretext='Something to display']
;
   columns sex age name;
   define sex /group page;
   define age/group;
   define name/display;
run;

Pretext is text to display something before, in this case the table of the report.

 

Otherwise you may need to provide some example data and the full code for your report. There can be some interesting interactions between elements in proc report and a solution that works with one data set may require significant differences with another.

Sarah-R
Obsidian | Level 7

Use the following compute before block, with the variable-that-contains-top-of-page-text to be blank for the pages after the first page:

 

compute before _page_;

    line @1   variable-that-contains-top-of-page-text;

endcomp;

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 3 replies
  • 1248 views
  • 1 like
  • 2 in conversation