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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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