Data visualization with SAS programming

ODS POWERPOINT (SAS9.4) and proc report with Call define statement for PNG file

Reply
New User
Posts: 1

ODS POWERPOINT (SAS9.4) and proc report with Call define statement for PNG file

Hi there, 

 

I want to create .pptx file for the generated graph in png format. I am using ODS with powerpoint and proc report inside. 

I get to see titles and footnotes but instead of PNG file it is just printing the cell.  Please help.

 

ods powerpoint file = "&opath/&rm_fileid..pptx" style = bnptemplate.rtf;
ods layout gridded rows=2;
ods region;

ods escapechar="~";
title;

/********************************************************************************************
* Output Table:
* -Create a dummy work dataset with one record per plot that will be output.
* -Run Proc report, with compute block outputting a record for each plot passed into the macro
* via the plotnames parameter.
* -Call the rmouttitle macro to add titles and footnotes to the table.
*********************************************************************************************/

data _rmtext;
format text $25.;
text = '(*ESC*)R"\par\ "';
%do i = 1 %to &n_plots;
output;
%end;

run;

%local tblwidth;

%if %upcase(&orient) = PORTRAIT %then %let tblwidth = 6;
%else %if %upcase(&orient) = LANDSCAPE %then %let tblwidth = 9;

proc report data = _rmtext ;* nowd;
column text;
define text / display style(column)=[cellwidth=&tblwidth.in] ' ';
compute text;
line_count + 1;
%do i = 1 %to &n_plots;
if line_count = &i then do;
call define(_row_,'STYLE', %str(%')STYLE={just=center preimage="&plotpath/&&plot&i...png"}%str(%'));
end;
%end;
endcomp;
%rmouttitle(outtype = graph);
run;

 

 

ods layout end;
ods powerpoint close;

Attachment
Post a Question
Discussion Stats
  • 0 replies
  • 82 views
  • 0 likes
  • 1 in conversation