Print with title and report without title:
ods ...
title2 'AAAAAA';
proc print data=...;
var ...;
label ...
run;
title2 '';
proc report data=...;
column ...;
by ...;
DEFINE ...;
format ...;
run;
ods ...
Just Signed up to Thank Cynthia. It has been a hell of a problem for me before I visited this forum.
Thank You again Cynthia.
Hello,
I would like to have ods rtf with title only in the fisrt page.
I tried your code (for pdf), I have the title on the 2 first pages:
ods pdf file='\\XXXXXXXX\TEST\onlyfirst.pdf' notoc;
proc report data=sashelp.shoes(firstobs=1 obs=33) nowd;
column region subsidiary product sales inventory returns;
title 'Title on First Page Only';
run;
title; /* clears previous title */
proc report data=sashelp.shoes(firstobs=34 obs=max) nowd;
column region subsidiary product sales inventory returns;
run;
ods _all_ close;
Maybe you know some option to do that?
Thank you very much!
Hi:
I do not have that experience with your code, SASHELP.SHOES and ODS PDF, as shown below:
Without knowing your orientation and margin options, I could not completely replicate your experience, but I used the options shown in the above screen shot and the title on page 1 worked for me. If you use the SAME options and orientation and margins and still get the title starting on page 2, then you might want to open a track with Tech Support for deeper investigation about your system settings.
Cynthia
Thank you Cynthia.
My problem is that I want the landscape format for my report.
This code does not work with landscape option.
Maybe you have some idea for additional option with lanscape format please. My code is:
options orientation=landscape topmargin=.5in bottommargin=.5in nodate nonumber;
title; footnote;
ods rtf file='\\XXXXXXXXXXXXXX\4. Résultats excel\3. Publipostage\TEST\onlyfirst.doc' ;
proc report data=sashelp.shoes(firstobs=1 obs=33) nowd;
column region subsidiary product sales inventory returns;
title 'Title on First Page Only';
run;
title;
proc report data=sashelp.shoes(firstobs=34 obs=max) nowd;
column region subsidiary product sales inventory returns;
run;
ods _all_ close;
Hello,
Thank you for the code.
Unfortunately,
I have the same proble: the title on the ALL pages:
My programme is:
ods pdf file='\\XXXXXX\TEST\onlyfirst.pdf' notoc;
options NOBYLINE;
proc report data=sashelp.shoes nowd;
column region subsidiary product sales inventory returns;
by Region Subsidiary;
title 'Title on First Page Only "#BYLINE"';
run;
ods _all_ close;
Thank you, still does not work for me, I have the titles on ALL pages:
ods pdf file='\\XXXXXX\4. Résultats excel\3. Publipostage\TEST\onlyfirst.pdf' notoc;
options NOBYLINE;
proc report data=sashelp.shoes nowd;
column region subsidiary product sales inventory returns;
by Region Subsidiary;
title 'Title on First Page Only "#BYLINE"';
run;
options BYLINE;
ods _all_ close;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.