I received this request from FDA , to generate a site level listing.
For example, if its an Adverse event listing, so they want all AEs to subjects from that site first and then page break by nest site and so on, whih is okay.
I can use page break option by site.
But the catch is, they want to reset the page no as well for the next site. I don't know how to do that. For example, they want page 1 of page 10 for next site in the same file.
Is there a way we could do that?
Also, is their any option which can create a table of content for all those sites in pdf, so that i can click on the link in TOC, and go to that site?
I am using proc report to generate the listings.
Your inputs are really appreciated.
Thanks,
Megha
Hi:
The issue that you are going to run into is that you want the first report to have page 1 of 10, page 2 of 10; and then you want to start over at page 1 of 10, page 2 of 10. You can reset the beginning page number. But by default, what you will get is page 1 of 20, page 2 of 20 and then after page 10 of 20, numbering would start over with page 1 of 20, page 2 of 20 again. You can see how it works for yourself with this example (only 4 pages total):
ods escapechar='^';
options pageno=1 nonumber nodate;
ods pdf file='c:\temp\testpgno.pdf';
proc report data=sashelp.shoes(obs=40);
title1 j=r 'Page ^{thispage} of ^{lastpage}';
title2 'SASHELP.SHOES';
run;
title;
options pageno=1;
ods pdf;
proc report data=sashelp.prdsale(obs=40);
title1 j=r 'Page ^{thispage} of ^{lastpage}';
title2 'SASHELP.PRDSALE';
run;
title;
ods pdf close;
But, note that one way to reset page numbers is to do it between procedure steps. The PROC REPORT statement allows you to use the BYPAGENO= option, when you have a BY statement, but again, that would give you 1 of 20, 2 of 20, etc for the first group and then 1 of 20, 2 of 20, etc for the second group.
Your only way to work it is to probably do it as 2 separate documents that you put together using an Adobe product or some 3rd party software to combine PDF files.
cynthia
cynthia
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.