BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
PSIOT
SAS Employee

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):

Contents.png

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,

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

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

View solution in original post

3 REPLIES 3
Ksharp
Super User

Try add one option.

 

proc report data=sashelp.class nowd contents='';
PSIOT
SAS Employee

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.

Cynthia_sas
SAS Super FREQ

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1330 views
  • 0 likes
  • 3 in conversation