BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I am trying to run proc report with rtf ods option. I have a macro so that two proc reports can run simultanously and print the output to an rtf file destination. When i try to run a second macro with a different variable its not printing in the rtf file.
I want both macros to be printed on same rtf file.

I have synatx for ods like this:

ODS RTF BODY ='U:\0701 Protocol\Reddy_0701\SAS_PRGM_701\Tables_701\t19_StudyRX.rtf'STARTPAGE=yes;

And the macro as:

%reprt (var=Final1A, var1=FiNAL1,var2='A', var3=Part 1 of 2,var4=FiNAL2,var5=FiNAL2A, var6 = Part 2 of 2);
%reprt (var=Final1B, var1=FiNAL1,var2='B', var3=Part 1 of 2,var4=FiNAL2,var5=FiNAL2B, var6 = Part 2 of 2);

Final1 and Final2 are two data sets using a proc reprt each. I have to subset the two data sets based on PLANS (A and B), so that in my final report datasets final1 and final2 should be printed one below the other for each plan.

When i am running the program, only plan A datasets (finalo1 and final2) are getting printing but not the paln B datasets.

It seems the ods is just printing according to first macro and ignoring the second macro output.
1 REPLY 1
deleted_user
Not applicable
Hi,

I Figured it out, i had the ods close at the wrong place,instead of after the macros.

Thanks

sas-innovate-2024.png

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.

 

Register now!

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
  • 656 views
  • 0 likes
  • 1 in conversation