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.
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;
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.
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.
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 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.