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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 927 views
  • 0 likes
  • 1 in conversation