Dear all,
I try to create a report (doc) with tables and graphs but when i include a graph with proc report, line table appears in content (see line in red):
Please find my code below
ods rtf file='\\vcarapp010\Rapports\01 - Pivotal study\Report\ReportForAllPatients\SixMinWalktest_CPX_Test_Report.doc' dpi=300 contents=yes toc_data;
ods noproctitle;
ods escapechar='~';
footnote1 j=left "~S={preimage='\\vcarapp010\Rapports\03 - MATERIALS FOR REPORT\Logocarmat2.JPG'}" j=r 'Page ~{thispage}';/*/~{lastpage}*/
ods proclabel 'Chapter 1: Six minutes Walkin test ';
proc report data= sixminuteWalkingTest2 nowd CONTENTS='Table 1.1 - Six minutes walking Test - Distance';
column INDEX Patient_Code preOp_value m1_value m2_value m3_value;
define index / group noprint;
break before index/ contents="" page;
define Patient_Code / style={cellwidth=15%} "Patient";
define preOp_value / style={cellwidth=10%} "Pre-Op";
define m1_value / style={cellwidth=10%} "M1";
define m2_value / style={cellwidth=10%} "M2";
define m3_value / style={cellwidth=10%} "M3";
title1 "Study Code: CAR2016-01 / Date: &SYSDATE.";
title2 'Table 1.1 - Six minutes walking Test - Distance';
run;
data pt1;
set sixminuteWalkingTest2;
run;
proc sort data=pt1;
by index;
run;
data pt1;
set pt1;
by index;
if last.index;
keep index;
run;
data fmt;
set pt1;
fmtname = "mypic";
start =1;
label = "\\vcarapp010\Rapports\01 - Pivotal study\Graphs\Histo_SixMinWalk.png";
keep fmtname label start;
run;
/* Create the format containing the links to the images. */
proc format cntlin=fmt;
run;
/* Create a format to blank out values in the column that will contain the image. */
proc format;
value blank other=" ";
run;
ods listing close;
data pt1;
set pt1;
index=1;
run;
ods rtf startpage=No; /*pour avoir un saut de page */
ods proclabel ' ';
proc report data=pt1 nowd CONTENTS="Graph 1.2: Six minutes walking test Histogram"
style(report)={background=white}
style(header)={foreground=black background=white height=0}
style(column)={just=right};
column index ('' image);
define index / group noprint;
break before index/ contents="" ;
define image/ '' computed style(column)=[postimage=mypic. just=l cellwidth=7.0 in ] format=blank.;
/* Set the computed variable equal to the variable */
/* value that matches the value in the $Mypic. format. */
compute image ;
image = 1;
endcomp;
title1 "Study Code: CAR2016-01 / Date: &SYSDATE.";
title2 "Graph 1.2: Six minutes walking test Histogram";
run;
Thanks for you help,
Hi:
I am not sure why you are using PROC REPORT for a HISTOGRAM however, the extra TABLE1 node is a known PROC REPORT "feature" and there are ways to get rid of it, as described in this Tech Support note: http://support.sas.com/kb/31/278.html .
cynthia
Try add one option.
proc report data=sashelp.class nowd contents='';
Thank for you answer,
like this?:
proc report data=pt1 nowd contents=''
style(report)={background=white}
style(header)={foreground=black background=white height=0}
style(column)={just=right};
column index ('' image);
define index / group noprint;
break before index/ contents="" ;
define image/ '' computed style(column)=[postimage=mypic. just=l cellwidth=7.0 in ] format=blank.;
/* Set the computed variable equal to the variable */
/* value that matches the value in the $Mypic. format. */
compute image ;
image = 1;
endcomp;
title1 "Study Code: CAR2016-01 / Date: &SYSDATE.";
title2 "Graph 1.2: Six minutes walking test Histogram";
run;
But I lose true title of chapter and table 1 is still there.
Hi:
I am not sure why you are using PROC REPORT for a HISTOGRAM however, the extra TABLE1 node is a known PROC REPORT "feature" and there are ways to get rid of it, as described in this Tech Support note: http://support.sas.com/kb/31/278.html .
cynthia
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: