我正在尋找使ODS PDF中的每個proc報告在PDF書籤的第三級具有其自己的指定標題。我怎樣才能實現這個概念?例如,在下面的圖片中,我想將「表格1」條目更改爲其他文本。Proc Report書籤ODS中的標題PDF
我的代碼如下:
ods escapechar '^';
ods pdf file='S:\Restricted\CITER-ER\BHO Phase II\Transition Monitoring\2. Service Utilization\2. Production\SAS codes\Tinkler\PDF Project\SAS REPORTS PDF\PDFS\table2.pdf' style=Custom;
TITLE "^{style [JUST= C ]Table 2. Names , 2014}";
TITLE2 "^{style [JUST= C ]State}" ;
Title3 "^{style [JUST= C ]Adult (21 to 64)}";
Title4 "^{style [JUST= C ] Analysis}" ;
options orientation=landscape nocenter
topmargin=.25in
bottommargin=.25in
leftmargin=.25in rightmargin=.25in ;
ods proclabel "IP";
PROC REPORT DATA = Table2x
style(report)={font_size=9pt cellpadding=2pt cellspacing=.15pt}
style(header)={background=VLIG foreground=black font_size = 9pt FONT_WEIGHT = bold just=C }
style(column)={font_size=8pt just=C}
STYLE(SUMMARY) = {font_weight=bold};
WHERE BH_Type = 'MH' ;
COLUMN (
(' ' P_type )
(' ' P_name)
('MH Inpatient Volume' AID_Type
UNIQUSERS N_Episode Admis_Tot Disc_Tot AvgLOS medianLOS LOS_C LOS T_AMT_PAID
AvgCostUser AvgCostEnc));
Define P_Type/ 'MMC Program or Coverage Type' group order=data style(column)= { cellwidth=20mm just=L } ;
Define P_name/ 'Plan Name or Coverage Type' group order=data style(column)= { cellwidth=30mm just=L } ;
Define AID_Type/ 'Aid Category' style(column)= { cellwidth=20mm} ;
Define UNIQUSERS/ 'Unique Users' FORMAT=COMMA12.0 style(column)= { tagattr='format:###,###,##0' cellwidth=20mm} ;
Define N_Episode/ '# of Episodes^{super 1}' FORMAT=COMMA12. style(column)= { tagattr='format:###,###,##0' cellwidth=20mm} ;
Define Admis_Tot / 'Admissions^{super 2}' FORMAT=COMMA12. style(column)= { tagattr='format:###,###,##0' cellwidth=20mm} Style(header)={FONT_WEIGHT = bold} ;
Define Disc_Tot / 'Discharges^{super 2}' FORMAT=COMMA12. style(column)= { tagattr='format:###,###,##0' cellwidth=20mm} Style(header)={FONT_WEIGHT = bold} ;
Define LOS_C/ 'Hospital Days^{super X}' Noprint FORMAT=COMMA12. style(column)= { tagattr='format:###,###,##0' cellwidth=15mm} Style(header)={FONT_WEIGHT = bold} ;
DEFINE LOS/ 'LOS for discharged^{super 4}' Noprint FORMAT=COMMA12. style(column)= { tagattr='format:###,###,##0' cellwidth=20mm} Style(header)={FONT_WEIGHT = bold} ;
Define T_AMT_PAID / 'Total Amount Paid,$' FORMAT=DOLLAR14. style(column)= { tagattr='format:$###,###,###' cellwidth=20mm} Style(header)={FONT_WEIGHT = bold} ;
Define AVGCOSTUSER / 'Avg Cost Per User, $' FORMAT=DOLLAR14. style(column)= { tagattr='format:$###,###,###' cellwidth=20mm} ;
Define AvgLOS / 'Mean LOS for Discharged Episode' FORMAT=COMMA12. style(column)= { tagattr='format:###,###,##0' cellwidth=20mm} ;
DEFINE MEDIANLOS/ 'Median LOS for Discharged Episode' FORMAT=COMMA12. style(column)= { tagattr='format:###,###,##0' cellwidth=20mm} ;
Define AVGCOSTENC / 'Avg. Cost Per Episode, $' FORMAT=DOLLAR14. style(column)= { tagattr='format:$###,###,###' cellwidth=20mm} ;
/* compute P_type;*/
/* if P_Type = 'Total' THEN call define(_row_,'style','style={background=VLIP just=R}'); */
/**/
/* end;*/
/* endcomp;*/
compute P_type;
bg + 1;
if mod(bg, 2) = 1 then
call define(_row_, "style", "style={background=white}");
ELSE call define(_row_, "style", "style={background=#d1e9d1}");
IF P_Type = 'Total' THEN call define(_row_,'style','style={background=VLIP just=R}');
endcomp;
RUN;
/*Need New Title*/
PROC REPORT DATA = Table2x
STYLE(header) = {background=VLIG foreground=black font_size = 10pt
FONT_WEIGHT = bold just=C}
STYLE(column) = {font_size = 12pt just=R}
STYLE(SUMMARY) = {font_weight=bold};
WHERE BH_Type = 'SUD' ;
COLUMN (
(' ' Year_Month)
(' ' P_type )
(' ' P_name)
('SUD Inpatient Volume' AID_Type
UNIQUSERS N_Episode Admis_Tot Disc_Tot AvgLOS medianLOS LOS_C LOS T_AMT_PAID
AvgCostUser AvgCostEnc));
DEFINE YEAR_MONTH/ 'YEAR and Month' style(column)= { cellwidth=20mm just=L } ;
Define P_Type/ 'MMC Program or Coverage Type' style(column)= { cellwidth=20mm just=L } ;
Define P_name/ 'Plan Name or Coverage Type' style(column)= { cellwidth=50mm just=L } ;
Define AID_Type/ 'Aid Category' style(column)= { cellwidth=20mm} ;
Define UNIQUSERS/ 'Unique Users' FORMAT=COMMA12.0 style(column)= { tagattr='format:###,###,##0' cellwidth=20mm} ;
Define N_Episode/ '# of Episodes~{super 1}' FORMAT=COMMA12. style(column)= { tagattr='format:###,###,##0' cellwidth=20mm} ;
Define Admis_Tot / 'Admissions~{super 2}' FORMAT=COMMA12. style(column)= { tagattr='format:###,###,##0' cellwidth=20mm} Style(header)={FONT_WEIGHT = bold} ;
Define Disc_Tot / 'Discharges ~{super 2}' FORMAT=COMMA12. style(column)= { tagattr='format:###,###,##0' cellwidth=20mm} Style(header)={FONT_WEIGHT = bold} ;
Define LOS_C/ 'Hospital Days~{super X}' Noprint FORMAT=COMMA12. style(column)= { tagattr='format:###,###,##0' cellwidth=15mm} Style(header)={FONT_WEIGHT = bold} ;
DEFINE LOS/ 'LOS for discharged~{super 4}' Noprint FORMAT=COMMA12. style(column)= { tagattr='format:###,###,##0' cellwidth=20mm} Style(header)={FONT_WEIGHT = bold} ;
Define T_AMT_PAID / 'Total Amount Paid,$' FORMAT=DOLLAR14. style(column)= { tagattr='format:$###,###,###' cellwidth=20mm} Style(header)={FONT_WEIGHT = bold} ;
Define AVGCOSTUSER / 'Avg Cost Per User, $' FORMAT=DOLLAR14. style(column)= { tagattr='format:$###,###,###' cellwidth=20mm} ;
Define AvgLOS / 'Mean LOS for Discharged Episode' FORMAT=COMMA12. style(column)= { tagattr='format:###,###,##0' cellwidth=20mm} ;
DEFINE MEDIANLOS/ 'Median LOS for Discharged Episode' FORMAT=COMMA12. style(column)= { tagattr='format:###,###,##0' cellwidth=20mm} ;
Define AVGCOSTENC / 'Avg. Cost Per Episode, $' FORMAT=DOLLAR14. style(column)= { tagattr='format:$###,###,###' cellwidth=20mm} ;
compute P_type;
if P_Type = 'Total' THEN call define(_row_,'style','style={background=VLIP just=R}');
endcomp;
RUN;
ods pdf close;
你能給出一個更具體的例子你正在尋找什麼?我不確定你的問題。 – DomPazz
你必須發佈你的代碼。該方法因使用BY組或多個PROC報告或其他方法而異。但是,可以使用Title或ODS TEXT語句。 – Reeza
我在一個ODS PDF輸出中有幾個proc報告。這些報告必須有不同的標題和一些不同的措詞。將Proc報告X和Proc報告Y-Z推送到一個ODS PDF中並使用不同標題很容易嗎? – Tinkinc