Hi,
How would I add bullet points mentioned in one cell in RTF using proc report.
• Protocol required data collection / testing (9)
• Study visit early or late (9)
• System not implanted per protocol (1)
Thanks in advance.
Hi
You can use the inline formatting functions to achieve what you are after. For that you need to set the ESCAPECHAR= option for ODS. You can find more information about the available inline formatting functions here: SAS(R) 9.4 Output Delivery System: User's Guide, Third Edition. The sample below use the {NEWLINE} and {UNICODE} functions. Please consider the length of this additional text in the variable that is used for reporting. The SPLIT= option is for spliting column header text.
Find below sample code.
Hi:
What does your data look like. Whether you can get all 3 lines into 1 cell is possible. Getting a bullet or indicator is possible using different characters and different fonts -- depending, of course, on your destination. You have not specified the destination. You have not shown the data and you haven't shown any code that you have tried. But the structure of any PROC REPORT code will very much depend on the structure of the data. So, what does your data look like? What code have you tried? What is your destination of interest?
cynthia
Here is the sample code and desired output. I used retain to bring the values to 1 row with '/' default split character. but when I used split="/". I am expecting all three text values one below other in final output.
data x;
input pt text $5-61;
cards;
1 • Protocol required data collection / testing (9)
1 • Study visit early or late (9)
1 • System not implanted per protocol (1)
;
data x1;
length temp $200;
set x;
retain temp;
by pt;
if first.pt then temp=strip(text);
else temp=strip(temp)||'/'||strip(text);
if last.pt;
run;
ods rtf file ="C:\Documents and Settings\Desktop\test.rtf";
proc report data=x1 nowd split="/";
column pt temp;
define pt/display;
define temp/display;
run;
ods rtf close;
Desired output:
1 | • Protocol required data collection / testing (9) • Study visit early or late (9) • System not implanted per protocol (1) |
Hi
You can use the inline formatting functions to achieve what you are after. For that you need to set the ESCAPECHAR= option for ODS. You can find more information about the available inline formatting functions here: SAS(R) 9.4 Output Delivery System: User's Guide, Third Edition. The sample below use the {NEWLINE} and {UNICODE} functions. Please consider the length of this additional text in the variable that is used for reporting. The SPLIT= option is for spliting column header text.
Find below sample code.
That worked. Thanks for your help.
BTW ^{newline} is taking my strings to next line whenever it see ^ and ^{unicode 25cf} is giving *(Bullet). Am I right?
Yes, you are right, check out the other Inline Formatting Function, as described in the doc.
Bruno
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.