The SAS Output Delivery System and reporting techniques

How to set length of footnote in proc report

Reply
Super Contributor
Posts: 272

How to set length of footnote in proc report

Dear,

 

I am getting the following warning message when I run Proc report because of footnote1. I tried set linesize to 300. It didnot help. Please help in my code.Thanks.

 

"WARNING: The quoted string currently being processed has become more than 262 characters long.
You might have unbalanced quotation marks."

 

Code:

 


OPTIONS nodate nonumber linesize=300;
ods listing close;
ods escapechar="^";
title1 justify=right 'page ^{pageof}';
title2 "Table 1 Treatment-Emergent Adverse Events (TEAEs) Occurring in >=5% of Subjects in Any Treatment Group with Onset Pre-Randomization by
System Organ Class and Preferred Term (Safety Population)";

footnote1 "Note: Adverse events are coded using the Medical Dictionary for Regulatory Activities (MedDRA), Version 18.0. Percentages are based on N, number of
subjects within each treatment group in the analysis population who took study drug before randomization. Multiple entries for an individual under system organ
class/preferred term are only counted once.";

footnote2 "Source: Reference Listing 16.2.7.1";
footnote3 "Program Name: t-14-03-01-02-01a.sas Table Generation: 07JUL2016 13:12";

options orientation=landscape formchar="|----|+|---+=|-/\<>*";

ods rtf file="re.rtf" style=journal;
proc report data=all2 nowd headline headskip style(report)=[frame=void];
column grpm grps grpws aetext ("JZP-110 Titration Phase" "_______________" cnt_pct1 cnt_pct2 cnt_pct3 cnt_pct4) ("JZP-110 Stable Dose Phase" "_______________" cnt_pct5 cnt_pct6 cnt_pct7 cnt_pct8);
define grpm/order noprint;
define grps/order noprint;
define grpws/order noprint;
define aetext/ display '' style(column)={asis=on cellspacing=.25pt just=left};
define cnt_pct1/ "75 mg" style(column)={cellspacing=.25pt just=left};
define cnt_pct2/ "150 mg" style(column)={cellspacing=.25pt just=left} ;
define cnt_pct3/ "300 mg" style(column)={cellspacing=.25pt just=left};
define cnt_pct4/"Combined
JZP-110
" style(column)={cellspacing=.25pt just=left} ;
define cnt_pct5 / "75 mg" style(column)={cellspacing=.25pt just=left};
define cnt_pct6/ "150 mg" style(column)={cellspacing=.25pt just=left} ;
define cnt_pct7/ "300 mg" style(column)={cellspacing=.25pt just=left};
define cnt_pct8/"Combined
JZP-110
" style(column)={cellspacing=.25pt just=left} ;
compute after grpm/style={protectspecialchars=off};
n+1;
len=ifn(n=1,20,0);
dummy='\brdrt\brdrs';
line dummy $varying20. len;
endcomp;
run;
ods rtf close;

 

 

 

Super User
Posts: 10,538

Re: How to set length of footnote in proc report

You will get that as long as you use a quoted string. Note that it is not an error. Typically the cause of long strings is mismatched quotes. If you know that is not the case then proceed. If you can't have warnings in the log then you'll have to come up with some other approach such as splitting the text into two footnotes.

Super User
Posts: 9,687

Re: How to set length of footnote in proc report

Maybe this option could get you get rid of this WARRING Message:

options noquotelenmax;


Super Contributor
Posts: 272

Re: How to set length of footnote in proc report

Thanks. That helped me. I need one more help. If possible can you help in my code to produce output I need(Similar to Vendor data). i am attaching two word documents with one my output and one vendor output. Please help

 

My code;

OPTIONS nodate nonumber noquotelenmax;
ods listing close;
ods escapechar="^";
title1 justify=right 'page ^{pageof}';
title2 " Treatment-Emergent Adverse Events (TEAEs) Occurring in >=5% of Subjects in Any Treatment Group with Onset Pre-Randomization by
System Organ Class and Preferred Term (Safety Population)";

footnote1 "Note: Adverse events are coded using the Medical Dictionary for Regulatory Activities (MedDRA), Version 18.0. Percentages are based on N, number of
subjects within each treatment group in the analysis population who took study drug before randomization. Multiple entries for an individual under system organ class/preferred term are only counted once.";
footnote2 "Source: Reference Listing 16.2.7.1";
footnote3 "Program Name: t-14-03-01-02-01a.sas Table Generation: 07JUL2016 13:12";

options orientation=landscape formchar="|----|+|---+=|-/\<>*";

ods rtf file="C:\Users\\Desktop\ae_1.rtf" style=journal;
proc report data=all2 nowd headline headskip style(report)=[frame=void];
column grpm grps grpws aetext ("JZP-110 Titration Phase" "_______________" cnt_pct1 cnt_pct2 cnt_pct3 cnt_pct4) ("JZP-110 Stable Dose Phase" "_______________" cnt_pct5 cnt_pct6 cnt_pct7 cnt_pct8);
define grpm/order noprint;
define grps/order noprint;
define grpws/order noprint;
define aetext/ display '' style(column)={asis=on cellspacing=.25pt just=left};
define cnt_pct1/ "75 mg" style(column)={cellspacing=.25pt just=left};
define cnt_pct2/ "150 mg" style(column)={cellspacing=.25pt just=left} ;
define cnt_pct3/ "300 mg" style(column)={cellspacing=.25pt just=left};
define cnt_pct4/"Combined
JZP-110
" style(column)={cellspacing=.25pt just=left} ;
define cnt_pct5 / "75 mg" style(column)={cellspacing=.25pt just=left};
define cnt_pct6/ "150 mg" style(column)={cellspacing=.25pt just=left} ;
define cnt_pct7/ "300 mg" style(column)={cellspacing=.25pt just=left};
define cnt_pct8/"Combined
JZP-110
" style(column)={cellspacing=.25pt just=left} ;
compute after grpm/style={protectspecialchars=off};
n+1;
len=ifn(n=1,20,0);
dummy='\brdrt\brdrs';
line dummy $varying20. len;
endcomp;
run;
ods rtf close;

 

Super Contributor
Posts: 272

Re: How to set length of footnote in proc report

Super User
Posts: 9,687

Re: How to set length of footnote in proc report

You could use this RAW code to get that underline.


ods escapechar="^";
proc report...;
  columns x ("^R'\brdrb\brdrs\brdrw15 'Powers" y z) ;


Super Contributor
Posts: 272

Re: How to set length of footnote in proc report

Dear,

 

Thanks for the help. I almost very close to getting the output I need. But one more issue. I need to have the second  underline after first row of values . I am attaching a sample document showing my output and the output I need. Please help in my code. The code that I am using is the one posted in the forum

 

%macro fontSpecs();
FONT_FACE = "SAS Monospace"
FONT_SIZE = 7pt
FONT_WEIGHT = medium
FONT_STYLE = roman
FOREGROUND = black
BACKGROUND = white
%mend;
proc template;
define style mystyle;
parent = Styles.rtf;
STYLE Continued from Continued/ pretext="" font=("SAS Monospace", 0pt) width=0% FOREGROUND=white;
STYLE parskip from parskip / font =("Arial", 1pt);
STYLE SystemTitle / %fontSpecs();
STYLE Header / %fontSpecs() ;
STYLE Data / %fontSpecs() ;
STYLE SystemFooter / %fontSpecs();
STYLE Table / %fontSpecs()
BORDERWIDTH = 1
CELLSPACING = 0pt
CELLPADDING = 0pt
FRAME = ABOVE
RULES = GROUPS
;
STYLE SysTitleAndFooterContainer /
CELLSPACING=0;
end;
run;
title1 justify=right 'page ^{pageof}';
title2 "";


ods listing close;
ods escapechar="^";
ods tagsets.rtf file="C:\test.rtf" style=mystyle;
data one; do aetext = 1 to 10; "cnt_pct1"= aetext ** 2; "cnt_pct2" = aetext ** 3; "cnt_pct3"= aetext ** 4; "cnt_pct4" = aetext ** 5
"cnt_pct5"= aetext ** 5; "cnt_pct6" = aetext ** 6; "cnt_pct7"= aetext ** 7; "cnt_pct8" = aetext ** 8;output; end; run;
proc report data=all2
nowindows missing
split='|' contents=''
style(column)={foreground=black cellspacing=1 just=C VJUST=M }
style(report)=[font_face='SAS Monospace']
;
column grpm grps grpws aetext ("^R'\brdrb\brdrs\brdrw15 'JZP-110 Titration Phase" cnt_pct1 cnt_pct2 cnt_pct3 cnt_pct4) ("^R'\brdrb\brdrs\brdrw15 'JZP-110 Stable Dose Phase" cnt_pct5 cnt_pct6 cnt_pct7 cnt_pct8);
%macro heaColStyle(hjust, cjust, width);
DISPLAY
style(header)=[font_face='SAS Monospace' just=&hjust.]
style(column)=[font_face='SAS Monospace' cellwidth=&width.cm just=&cjust.]
%mend;
define grpm/order noprint;
define grps/order noprint;
define grpws/order noprint;
define aetext/ display '' style(column)={asis=on cellspacing=.25pt just=left};
define cnt_pct1/ "75 mg" style(column)={cellspacing=.25pt just=left};
define cnt_pct2/ "150 mg" style(column)={cellspacing=.25pt just=left} ;
define cnt_pct3/ "300 mg" style(column)={cellspacing=.25pt just=left};
define cnt_pct4/"Combined
" style(column)={cellspacing=.25pt just=left} ;
define cnt_pct5 / "75 mg" style(column)={cellspacing=.25pt just=left};
define cnt_pct6/ "150 mg" style(column)={cellspacing=.25pt just=left} ;
define cnt_pct7/ "300 mg" style(column)={cellspacing=.25pt just=left};
define cnt_pct8/"Combined

" style(column)={cellspacing=.25pt just=left} ;
run;
ods tagsets.rtf close;
ods listing ;
footnote1 ".";
footnote2 "Source: ";
footnote3 "Program Name: ";

 

 

Super User
Super User
Posts: 7,414

Re: How to set length of footnote in proc report

Why put that extremely long footnote oin one statement?  You have up to 9 footnote places, the only time you would need a really long one (in which case you would use rtf line breaks) is if you have more than that.  Simply changing your code slightly to:

footnote1 "Note: Adverse events are coded using the Medical Dictionary for Regulatory Activities (MedDRA), Version 18.0. Percentages are based on N, number of";
footnote2 "subjects within each treatment group in the analysis population who took study drug before randomization. Multiple entries for an individual under system organ class/preferred term are only counted once.";
footnote3 "Source: Reference Listing 16.2.7.1";
footnote4 "Program Name: t-14-03-01-02-01a.sas Table Generation: 07JUL2016 13:12";

Will resolve the warning you get - note that warnings are given for a reason, hiding them with options is only viable if you know what your doing - this would come out as a QC finding if I saw it.

As a final note, why are you hardcoding datetime stamp in your footnote - this again would be a QC finding from my side, use:

%sysfunc(date(),date9.) %sysfunc(time(),time5.)

in your footnote so you get acurate information.  You will also want to strip % of N values, that doc you post has wrapping and stuff going on - not good.  Also, I would be careful about what you post, it is far better to make up some test data, and show that as datastep and required output than actually using study data outputs.

Ask a Question
Discussion stats
  • 7 replies
  • 763 views
  • 4 likes
  • 4 in conversation