Dear all,
I have this code
ods region;
title1 h=8pt color=dimgray "Baseball players";
title3 h=6pt color=dimgray "players by league";
ods pdf file="test.pdf" startpage=never style=journal;
ods layout gridded columns=2 rows=2 advance=proc column_gutter=0.1in row_gutter=0.1in;
ods graphics / width=3.5in noborder;
title3 " ";
title1 " ";
proc sgplot data=sashelp.baseball;
where league = "American";
vbar team / response=nruns group=division;
run;
proc sgplot data=sashelp.baseball;
where league = "American";
vbar team / response=nruns group=division;
run;
ods layout end;
ods region;
ods graphics / width=3.5in noborder ;
ods layout gridded columns=2 rows=2 advance=proc column_gutter=0.1in row_gutter=0.1in;
proc sgplot data=sashelp.baseball;
where div = "NE";
vbar team / response=nruns group=division;
run;
proc sgplot data=sashelp.baseball;
where div = "NW";
vbar team / response=nruns group=division;
run;
ods layout end;
ods pdf close;
and wish to remove the title (the title should be on the first page but not on the second page) from the second page. I don't really know my this is not working. Please help
Still don't see how you get two pages.
Easiest may be to use either ODS TEXT or possibly Proc ODSTEXT to place text when wanted instead of title statements.
Ods text='Line of text';
When I run your code there is only one page created so I do not understand your comment about pages.
Perhaps you may not be clear on what Startpage=never does.
NEVER specifies not to insert page breaks, even before graphics procedures.
There would also tend to be interactions with layout instructions. I won't claim to be an expert on those as I don't use PDF very often.
To clear titles you use something like
title;
If you provide a value in quotes then you create title of blanks, you don't clear them. The above will clear the title1 and all higher numbered title lines. You do not need to address each title to clear it. Example: Title3; would clear title lines 3 through 10, if present but leave 1 and 2 alone.
Still don't see how you get two pages.
Easiest may be to use either ODS TEXT or possibly Proc ODSTEXT to place text when wanted instead of title statements.
Ods text='Line of text';
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.