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;

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 3 replies
  • 931 views
  • 1 like
  • 2 in conversation