BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
mariko5797
Pyrite | Level 9

As the subject title suggests, I am having issues getting my table to output in an RTF file. The only thing that outputs is the title given. Any ideas as to where the problem lies? Thank you in advance!

data test;
 input ordb bmi $ ords stat $ _1 _2 _3 _4 @@;
 cards;
 1 Obese 1 N 	2 3 4 5
 1 Obese 2 DV 	2 3 4 5
 2 NotOb 1 N	2 3 4 5
 2 NotOb 2 DV	2 3 4 5
 3 SevOb 1 N	2 3 4 5
 3 SevOb 2 DV	2 3 4 5
 4 Comp	 3 P	0.1 . . 0.02
 ;
run;
	ods rtf file = "G:\VID\ANTIMICROBIALS\STAT\160076\24_Final Reports\Tables\Tab_summ_stats_test.rtf" style = work.CSR_rtf_portrait;
	ods rtf startpage = yes text = "^S = {cellwidth = 6.5in just = l fontsize = 12pt fontweight = bold}Testing Data";

	proc report data = test nowd split = '*'
	 %reportStyle;

			column ("^S = {borderbottomcolor = white}" ordb bmi) ("^S = {borderbottomcolor = white}" ords stat)("Time Post Start of Infusion" _1 _2 _3 _4); 

			define ordb	/ order noprint;
			define bmi 	/ display "BMI";
			define ords	/ order noprint;
			define stat	/ display "Statistic";
			define _1 	/ display "0-<12 hours";
			define _2	/ display "12-<24 hours";
			define _3	/ display "24-<48 hours";
			define _4	/ display "48+ hours";

	 compute after;
	 	line "Note: If more than one sample collected per time period, the mean plasma concentration by subject was summarized. The p-value is for an ANOVA comparing concentrations by obesity status
	 and is only computed if >3 subjects have a concentration within the time period for at least two groups.";
		line 'Note: Concentrations were adjusted for dose received at time sample taken.';
	 endcomp;

	run;

	ods rtf close;

 

The report style and template used are outlined below:

proc template;
	*define style styles.CSR_rtf_portrait;
	define style work.CSR_rtf_portrait;
	parent=styles.rtf;
	style body from document /
		leftmargin=0.75in
		rightmargin=0.38in
		topmargin=0.38in
		bottommargin=0.38in;
	end;
run;
%macro reportStyle;
	style(report)=[just=center cellspacing=1 font_face="times new roman" font_size=9pt outputwidth=100%]
	style(header)=[just=center font_size=2 background=white foreground=black font_face="times new roman" font_size=9pt]
	style(column)=[just=center font_size=2 background=white just=center font_face="times new roman" font_size=9pt]
	style(lines)=[font_size=2 background=white just=left font_face="times new roman" font_size=9pt];
	footnote j=c h=12pt color=red bold "CONFIDENTIAL";
%mend;

The log file has no warnings or errors

1596      ods rtf file = "G:\VID\ANTIMICROBIALS\STAT\160076\24_Final Reports\Tables\Tab_summ_stats_test.rtf" style =
1596! work.CSR_rtf_portrait;
NOTE: Writing RTF Body file: G:\VID\ANTIMICROBIALS\STAT\160076\24_Final Reports\Tables\Tab_summ_stats_test.rtf
1597      ods rtf startpage = yes text = "^S = {cellwidth = 6.5in just = l fontsize = 12pt fontweight = bold}Testing Data";
1598
1599      proc report data = test nowd split = '*'
1600       %reportStyle;
MPRINT(REPORTSTYLE):   style(report)=[just=center cellspacing=1 font_face="times new roman" font_size=9pt outputwidth=100%]
style(header)=[just=center font_size=2 background=white foreground=black font_face="times new roman" font_size=9pt]
style(column)=[just=center font_size=2 background=white just=center font_face="times new roman" font_size=9pt]
style(lines)=[font_size=2 background=white just=left font_face="times new roman" font_size=9pt];
MPRINT(REPORTSTYLE):   footnote j=c h=12pt color=red bold "CONFIDENTIAL";
1601
1602              column ("^S = {borderbottomcolor = white}" ordb bmi) ("^S = {borderbottomcolor = white}" ords stat)("Time Post Start
1602!  of Infusion" _1 _2 _3 _4);
1603
1604              define ordb / order noprint;
1605              define bmi  / display "BMI";
1606              define ords / order noprint;
1607              define stat / display "Statistic";
1608              define _1   / display "0-<12 hours";
1609              define _2   / display "12-<24 hours";
1610              define _3   / display "24-<48 hours";
1611              define _4   / display "48+ hours";
1612
1613       compute after;
1614          line "Note: If more than one sample collected per time period, the mean plasma concentration by subject was summarized.
1614! The p-value is for an ANOVA comparing concentrations by obesity status
1615       and is only computed if >3 subjects have a concentration within the time period for at least two groups.";
NOTE: The quoted string currently being processed has become more than 262 characters long.  You might have unbalanced quotation
      marks.
1616          line 'Note: Concentrations were adjusted for dose received at time sample taken.';
1617       endcomp;
1618
1619      run;

NOTE: There were 7 observations read from the data set WORK.TEST.
NOTE: PROCEDURE REPORT used (Total process time):
      real time           0.05 seconds
      cpu time            0.01 seconds


1620
1621      ods rtf close;









1 ACCEPTED SOLUTION

Accepted Solutions
mariko5797
Pyrite | Level 9

Figured it out: ODS EXCLUDE ALL was written earlier in the original code, so anything ran after that would not appear.

View solution in original post

7 REPLIES 7
Ksharp
Super User
I tested your code , and get no problem .
Do you check the path "G:\VID\ANTIMICROBIALS\STAT\160076\24_Final Reports\Tables\Tab_summ_stats_test.rtf" ?
if there is a rtf file "Tab_summ_stats_test.rtf" ?
mariko5797
Pyrite | Level 9

There is a RTF file in the proper folder. It only contains the title and footnote though. I tried changing the pathway to my desktop and still have the same issue.

mariko5797
Pyrite | Level 9
Time stamp 2/4/2022 8:51 AM
mariko5797
Pyrite | Level 9
Mentioned in my reply to @Ksharp: I tried changing the pathway to see if that may be part of the issue, but it didn't help. There is a document with the proper title in G drive folder and when I tried saving to my desktop, but only the title and footnote appear. I am running SAS 9.4 TS Level 1M7, if that makes any difference at all.
mariko5797
Pyrite | Level 9

Figured it out: ODS EXCLUDE ALL was written earlier in the original code, so anything ran after that would not appear.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 7 replies
  • 1616 views
  • 0 likes
  • 3 in conversation