2014-03-27 1 views
1

현재 자동화 된 SAS 보고서를 설정하려고합니다. 나는 Windows 작업 스케줄러에 예약됩니다 자동화 부분에 대해 다음 테스트 배치 프로그램을 작성했습니다 :"ods html text ="를 사용하여 배치 SAS 프로그램의 출력 문서에 html 삽입

"C:\SAS Location\sas.exe" -sysin "C:\SAS program location\test_report.sas" -LOG "C:\Log location\test_report.log" -PRINT "C:\Output Location\test_report.lst" 

다음과 같이 다음과 같은 기본 보고서는 시작 :

%let date = %sysfunc(date(),worddate.); 
ods graphics on; 
title; 

ods html path='C:/folder for HTML file' 
    gpath='C:/folder for images' 
    body="dental_screen_report_&sysdate..htm" 
    headtext="<title>Dental Screening Report &date</title>" 
    style=htmlblue; 

ods html text=" 
<table style='width:100%'> 
<tr style='text-align:center'> 
    <td><a href='C:/Location of PDF version of report/dental_screen_report_&sysdate..pdf'>Download PDF</a></td> 
</tr> 
</table> 
</br> 
"; 

*proc template code is placed in here to generate report. 
ods html close; 

내가 직접 코드를 실행 SAS에서 HTML에 대한 링크가 삽입 된 HTML 코드가 제대로 작동하지만 배치 프로그램을 실행하면 html이 올바르게 인코딩되지 않은 것처럼 보입니다 (아래 참조). 나머지 보고서는 괜찮습니다. 더 이상 작동하지 않는 PDF 링크 일뿐입니다.

<div class="l usertext"> &lt;table style=&#39;width:100%&#39;&gt; &lt;tr style=&#39;text-align:center&#39;&gt;  &lt;td&gt;&lt;a href=&#39;C:/Users/GarrettWeaver/desktop/urgent/pdf/dental_screen_report_26MAR14.pdf&#39;&gt;Download PDF&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/br&gt;</div> 

일괄 프로그램을 통해 올바르게 작동하는 법을 잘 모르겠습니다. SAS 프로그램 내에 삽입하는 대신 SAS 외부에 링크를 추가하는 것이 더 낫지 않습니까?

의견을 보내주세요.

+0

문제를 해결할 수 있었고 공백이나 문자를 반환 할 수 없었습니다. – skijunkie

답변

1

알아 냈어.

배치 파일에서 작동하려면 공백, 문자, 탭 등을 사용할 수 없습니다. SAS가 배치 모드로 실행됩니다. 알려주세요. 감사.

ods html text="<table style='width:100%'><tr style='text-align:center'><td><a href='C:/Location of PDF version of report/dental_screen_report_&sysdate..pdf'>DownloadPDF</a></td></tr></table></br>"; 
+0

(코드에서) 더 읽기 쉽게하려면 여러 ODS TEXT 문을 사용할 수 있습니다. –

+0

좋은 아이디어! 특히 다른 사람들이 보고서 디자인에 의견을 제공해야하기 때문에. – skijunkie

관련 문제