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;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.