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;
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!
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.