BookmarkSubscribeRSS Feed

Report 를 생성하기 위한 사전 작업

Started ‎06-10-2020 by
Modified ‎06-10-2020 by
Views 426

<Report를 생성하기 위한 사전 작업>

 ’Journal’ Style Template 수정하기

proc template;

  define style styles.journalR;

  parent=styles.journal;

  class fonts /

    "DocFont"      = ("Georgia", 9 pt)

    "EmphasisFont" = ("Georgia", 9 pt, Bold)

    "HeadingFont"  = ("Georgia", 16 pt, Bold Italic);

  class table /  rules=none  borderwidth=2 pt;

  class header / just=left;

  class NoteContent / font=fonts("EmphasisFont");

  class systemtitle / font_size=16 pt   just=center;

  class systemfooter / font_size=10 pt   just=left textindent=1.4 in;

end;

run;

 Report 생성에 사용되는 매크로 변수 생성하기

%let title1   = 2011 Sales;

%let rndfoot  = Note: Sales are rounded up to the nearest dollar.;

%let dreffoot = Figure 1.2: Summary Report; 

%let sreffoot = Figure 1.1: Detail Report; 

%let odsopt   = nodate nonumber orientation=portrait missing=" ";

%let outpath  = C:\Users\User\Desktop\APR FINAL CH1_5\Output\;

%let template = JOURNALR;

 

 

 code 이해하기
proc
 template;

  define style styles.journalR; /*journalR이라는 스타일 생성하기*/

  parent=styles.journal; /*기본 스타일은 journal로 설정하기*/

  class fonts /

    "DocFont"      = ("Georgia", 9 pt) /*Table의 셀 Font로 지정할 Georgia 글꼴, 9pt인 ‘DocFont’생성하기*/

※ NoteContent는 아래의 표에서 빨간 글씨 부분을 의미함 
   파란 글씨 부분은  Column Header를 의미함

Store

Region

Sales

1/ Smith-Find Goods

East

$107,024

 

West

$200,310

2/ J.B. Prog&Co.

East

$120,050

 

West

$89,499

       

    "EmphasisFont" = ("Georgia", 9 pt, Bold) /*NoteContent의 Font로 지정할 Georgia 글꼴, 9pt, Bold체로 적용하기*/

    
"HeadingFont"  = ("Georgia", 16 pt, Bold Italic); /*Column header의 Font로 지정할 Georgia 글꼴, 16pt, 굵게, 폰트 스타일 Italic인 ‘EmphasisFont’생성하기*/

  class table /

    rules=none /*Journal에서 Table Header의 경계선 default 조건을 무효화하기*/

    borderwidth=2 pt; /*테두리 굵기를 2pt로 설정하기*/

 

  class header /

    just=left; /*Header 왼쪽 정렬하기*/

  class NoteContent /

    font=fonts("EmphasisFont");  /*NoteContnet의 Font를 EmphasisFont로 설정하기 */

  class systemtitle /

    font_size=16 pt  /*system title의 Font 크기를 16pt로 적용하기*/

    just=center;  /*system title 가운데 정렬하기*/

  class systemfooter /

    font_size=10 pt

    just=left

    textindent=1.4 in; /*system 바닥글 1.4 들여쓰기*/

end;

run;

/* &TITLE1로 할당되는 “2011 Sales” TITLE */
%let title1   = 2011 Sales;

/* &RNDFOOT으로 할당되는 “Sales are rounded up to the nearest dollar.” FOOTNOTE */
%let rndfoot  = Note: Sales are rounded up to the nearest dollar.;

/* Detail Report는 &DREFFOOT으로, Summary Report는 &SREFFOOT으로 참조하기*/
%let dreffoot = Figure 1.2: Summary Report; 
%let sreffoot = Figure 1.1: Detail Report; 

/* ODS RTF Report에 적용하고 싶은 Sas System 옵션을 &ODSOPT에 저장하기*/
%let odsopt   = nodate nonumber orientation=portrait missing=" ";

/* Reports를 저장하고 싶은 위치를 &OUTPATH에 할당하기 */
%let outpath  = C:\Users\User\Desktop\APR FINAL CH1_5\Output\;


/* Reports에 적용할 template style을 &TEMPLATE에 할당하기 */
%let template = JOURNALR;

 

Version history
Last update:
‎06-10-2020 02:04 AM
Updated by:
Contributors

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

Article Labels
Article Tags