BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
HitmonTran
Pyrite | Level 9

Hi, 

 

I was wondering if the below screen shot is possible to output "Part 1" & "Part 2" lab tests into one PDF output using proc report?

 

thanksproc report.png

1 ACCEPTED SOLUTION

Accepted Solutions
HitmonTran
Pyrite | Level 9

was able to solve this by using the same filename=

View solution in original post

4 REPLIES 4
Cynthia_sas
SAS Super FREQ

Hi:
It is pretty easy to do "page x of y" page numbers using ODS PDF. I guess the question is do you have the word "Parts" instead of "Page"??? Is a "part" the same as a "page"? If so, then something like this should work;

Output:

program_parts.png

 

Code:

sas_code_parts.png


Cynthia

HitmonTran
Pyrite | Level 9

Hi Cynthia,

 

No it's not pages/page # but rather separate variables from the same dataset:

 

col1-col7 = part 1

col1-col5, col8-col12 = part 2

 

Both need to be in the same pdf output but sort by "parts", thank you!

 

data all;
	merge fia hda mpa;
	by siteid trt01pn trt01p subjid avisitn adt  avisit; 

    		col1 = strip(siteid) ;
		col2 = strip(trt01p);
		col3 = 'S'||strip(subjid) ;
		col4 = strip(avisit)  ;
		col5 = strip(put(adt,date9.));
         
			/***PART 1***/
		***FIA;
		col6=strip(fiafia);
		col7= '' ; **missing "commens" column;


			/***PART 1***/
		***HDA;
		*format col9 col10 7.1;
		col8=strip(hda2);
		col9=strip(hda4); *HDA  Paralysis Time (min);
		col10=strip(hda3); *HDA Antibody Titer (IU/L);

		***MPA;
		*format col12 7.1;
		col11=strip(mpa5);
		col12=strip(mpa6); *mortality;
run;

 

Reeza
Super User
Look at the STARTPAGE option on the ODS PDF statement and set it to NONE or NEVER. Right not it likely defaults so each table is on it's own page.
HitmonTran
Pyrite | Level 9

was able to solve this by using the same filename=

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1086 views
  • 0 likes
  • 3 in conversation