Hi all,
I want to create a bi-section report on one page with the top section being a line graph (like patient weight over the time) and bottom section being the patient Adverse Event listing so that it is easier to review if there is any relationship between weight loss or gain with the Adverse Event experienced.
Could someone point out the direction for me?
Thanks
Get something together for one version of the report and then you can generalize it. Here's a basic example of what you need to do. I would suggest first getting the code for your graphs and tables, then put them together and then automate it for everyone.
UCLA introductory tutorial on macro variables and macros
https://stats.idre.ucla.edu/sas/seminars/sas-macros-introduction/
Tutorial on converting a working program to a macro
This method is pretty robust and helps prevent errors and makes it much easier to debug your code. Obviously biased, because I wrote it 🙂 https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md
Thanks for your reply @Reeza
Probably I wasn't clear, I have the program to generate the png graph by patient though ODS RTF, so the top part of Word document is the graph I need, I just want to know how to insert the listing of Adverse Events of the same patient in the bottom part of the page.
Dose anyone else have any idea?
Your help would be greatly appreciated!!
Thanks again @Reeza
This is really helpful.I have added "By Name" in below and I am hoping that each page has the graph on top and list at the bottom (instead of all the graphs first and then followed by all the list of table). Is it doable?
ods rtf file='C:\Users\Yichuan Zhang\Documents\demo.rtf' style=meadow startpage=no;
ods graphics / height = 3in width=5 in;
proc sgplot data=sashelp.class;
scatter x=height y=weight;
by Name;
run;
proc print data=sashelp.class;
by Name;
run;
ods rtf close;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.