The SAS Output Delivery System and reporting techniques

SAS Report PDF to Sharepoint Folder

Reply
Contributor
Posts: 34

SAS Report PDF to Sharepoint Folder

I am trying to push some proc report results to a sharepoint folder as a PDF. I get this error:

 

ERROR: Physical file does not exist

 

I was wondering if I need to work with our sys admin to grant SAS the necessary permissions to SharePoint in order to write files to folders, or if I am using the wrong command code. I am currently trying to use the ODS PDF command.

 

%let date=%sysfunc(putn(%sysfunc(today()),mmddyyd10.));

options nobyline orientation=landscape;

ods listing close;

 

ods pdf file="sharepoint path &date .pdf";

 

%let month = %sysfunc(today(),monname12.);

%let year = %sysfunc(today(),year4.);

TITLE1 j=l h=5 "Agent Productivity Dashboard: &month &year";

TITLE2 j=left h=3 "Agent: #byval2 (#byval1)";

TITLE3 j=left h=3 "Supervisor: #byval3";

FOOTNOTE;

proc report...

 

...run;

 

ods pdf close;

 

 

Thank you,

Nathan

Super User
Posts: 12,996

Re: SAS Report PDF to Sharepoint Folder

Posted in reply to NathanOch

Show the code and the error from the log. Paste into a code box opened with the {I} icon to maintain formatting of any messages.

Many of the error messages indicate where the error occurs but the main windows on this forum reformat text losing some of the information.

 

SAS Super FREQ
Posts: 9,253

Re: SAS Report PDF to Sharepoint Folder

Hi:

  Here are two examples that I use as Sharepoint examples. Note that I used a UNC location for my Sharepoint site and I did have to go to my Sharepoint admin to get the correct UNC name and get the "cztest" folder added to that location with write access permissions.

 

cynthia

 

ods _all_ close;
title; footnote;
  
options topmargin=.25in bottommargin=.25in leftmargin=.25in rightmargin=.25in;
  
** make pdf file;
filename pdf_out '\\xxx.yyy.sas.com\zzz\Shared Documents\Examples\cztest\report1.pdf';
  
ods pdf(id=p) file=pdf_out ;
proc report data=sashelp.class;
  title 'This PDF file is on SharePoint';
  column age height,(min mean max);
  define age / group;
  define height / analysis;
run;
  
ods pdf(id=p) close;
filename pdf_out clear;
  
** make html file;
filename htm_out '\\xxx.yyy.sas.com\zzz\Shared Documents\Examples\cztest\report2.html';
  
ods html(id=h) body=htm_out encoding=UTF8 dev=gif ;
proc report data=sashelp.class;
  title 'This HTML file is on SharePoint';
  column age height,(min mean max);
  define age / group;
  define height / analysis;
run;
  
ods html(id=h) close;
filename htm_out clear;
Ask a Question
Discussion stats
  • 2 replies
  • 200 views
  • 0 likes
  • 3 in conversation