BookmarkSubscribeRSS Feed
henry12345
Calcite | Level 5

I know how to do that for footnote and header with "compute after" and "compute before". But

May I know how I can specify the unique value for "xxx" in red below per page in the description of column "b" when using proc report?

for example, it would be N=10 in page one and N=11 in page 2... Thank you. 

 

proc report data=final nowd nocenter headline headskip missing split='^' spacing=1;
column ('_' a b c);
define a /order noprint;
define b /center "Subjects Evaluable for TE*a^(N=xxx)^n (%)" width=30 spacing=1 id group order=data;
define c /center "abc" width=30 spacing=1 id group order=data;

 

break after a/ page;

compute before _page_;

...

compute after _page_;

...

run;

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:
I'm still now clear on what XXX represents? If you mean page number, I think that can only be used in the TITLE and FOOTNOTE statements. Your output is using LISTING only options like HEADLINE, HEADSKIP, WIDTH= and SPACING= that are only used by the LISTING or OUTPUT destination. What is confusing is that the N=XXX doesn't make sense to me because if page 1 will have N=10 and page 2 will have N=11 how do you know that page 2 will be 11? Will page 3 be 12 and page 4 have a value of 14 for XXX?
Can you clarify exactly what your data looks like by providing a sample dataset. Can you also clarify what the output destination should be? Are you only creating output for the LISTING window or do you envision creating RTF, PDF, HTML or Excel output? If you are trying to create any ODS output then some of your options will not work.
The other issue I see is that the column header typically doesn't change from page to page. So once you have your N=XXX on page 1, the usual behavior of PROC REPORT would be to repeat the SAME value for the header on every page. in a compute before or compute after block, you could use a macro variable to change text that you would write with a LINE statement. However, the column headers for each variable would typically NOT change because they can't be touched by the COMPUTE BEFORE or COMPUTE AFTER code.

Cynthia

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
  • 1 reply
  • 441 views
  • 0 likes
  • 2 in conversation