Hi Everyone,
I am using SAS 9.4 and attempting to generate all graphs, then present them collapsed under the Table of Contents.
Here is my program
ods graphics on;
ods _all_ close;
ods document name=WORK.CONTENTS(write);
data FigureTitle;
length no number $ 60 title item $ 200;
infile CARDS dlm=':';
input no $ title $ number $ item $ @@;
cards;
01:Safety:Figure 1
01:Safety:Figure 2
01:Safety:Figure 3
;
run;
data FigureTitle; set FigureTitle; pp=1; run;
proc report data=FigureTitle nowd
colwidth=8 spacing=2
center headskip split='|'
contents="Table of Contents";
columns pp no title number item;
define pp / group noprint;
define no / display noprint;
define title / group left style=[cellwidth=40mm] '' '' flow;
define number / display left style=[cellwidth=40mm] 'No.' '';
define item / display left style=[cellwidth=160mm] 'Item' '' flow;
break before pp /page contents='';
title7 j=c h=9pt "Table of Contents";
run;
title7;
quit;
proc lifetest data=SurvivalData1 plots=survival method=KM;
time T * Status(0);
strata Group;
run;
proc lifetest data=SurvivalData2 plots=survival method=KM;
time T * Status(0);
strata Group;
run;
ods graphics off;
ods listing;
ods document close;
proc document name=WORK.CONTENTS;
list / details levels=all;
ods output Document.Properties=WORK.CONTENTS;
run;
quit;
Then, I have a list of document properties as below.
Does anyone know how to move all documents with Type = Graph to the Report#1?
I've tried '^(where=(_type_='Graph')) to Report#1' but not work..
Furthermore, is there a way to adjust the Label in the document properties list based on the title defined in the TOC?
Thanks!
Recommend showing the entire code you used where you attempted to select graphs with: '^(where=(_type_='Graph')) to Report#1'
and the log.
By eye I would not expect that to work as the ^(where=) as I think the ^ in that position is likely to be treated as NOT. So would have selected everything except graphs.
"But not work" is awful vague.
Are there errors in the log?: Post the code and log in a code box opened with the "</>" to maintain formatting of error messages.
No output? Post any log in a code box.
Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the "</>" icon or attached as text to show exactly what you have and that we can test code against.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.