Hello, i have a few questions:
1. in my report i have three columns in the header. i need two of them will be only on the first page? how i do it?
title1 justify=left '^S={preimage="......\logo.jpg" }';
title2 justify=left height=10pt bold '.......;
justify=right height=12pt bold '........;
2. i want that my text will begin from the second page?
why the option startpage=now is not working?
thank you
Alexey
1) add an option in the last column.
proc report data=sashelp.class nowd; columns name age weight; define weight /page; run;
2) what do you mean ? What is your text ? or title ?
Did you try startpage=proc or ods text= ?
Xia Keshan
1) add an option in the last column.
proc report data=sashelp.class nowd; columns name age weight; define weight /page; run;
2) what do you mean ? What is your text ? or title ?
Did you try startpage=proc or ods text= ?
Xia Keshan
Hi:
Regarding #2 suggestion, STARTPAGE=PROC is NOT a valid value for STARTPAGE= -- see screen shot.
Regarding #1, I am not entirely clear on what the person wants. It almost seems as though the TITLE statements are being used for a cover page and then the output is supposed to start on page 2 of the document??? Without more of code example from the OP, the question is nearly impossible to answer. All we got shown was 2 title statements.
But assuming that the OP only wants the TITLE on PAGE 1 and then wants the main procedure output to start on page 2, that is what is produced with the code below. See screen shot. I wanted to put something on page 2 to show the page numbering started at 2, so, I used some dummy text and a page number.
Cynthia
options nodate nonumber;
ods rtf file='c:\temp\usestartpage.rtf' startpage=no;
ods escapechar='~';
title1 j=l 'Something for the Logo';
title2 j=l height=10pt bold 'Left'
j=r height=12pt bold 'Right';
** put something on page 1;
ods text=' ';
** blank out the title;
title;
** issue STARTPAGE=NOW;
ods rtf startpage=now;
title2 j=l 'Startpage works' j=r height=12pt bold 'Page ~{thispage} of ~{lastpage}';
proc print data=sashelp.shoes;
var region product sales inventory;
run;
ods rtf close;
Thank you for your help. I run your code and it's really work, but my code is not run as your.
options nonumber nodate;
ods rtf file='C:\..........\ControlReportDeveloper.rtf' startpage=no ;
ods escapechar = '~';
title1 j=l '~S={preimage="C:\...........\logo.jpg" }';
title2 j=l height=10pt bold 'Left'
j=r height=12pt bold 'Right';
ods text='Alexey';
title;
ods rtf startpage=now;
title2 justify=left j=l height=10pt bold 'Cilic Champion';
ods text='~{newline 6}';
ods text='~{style[font=(Arial) just=r fontweight=bold fontsize=14pt] Description}';
ods rtf close;
on the first page i get on the header : logo, Left and right and text : Alexey . It's OK
on the second page i still get logo, Left and right (title is not work?) and Description. I had to get header Cilic Champion and text Description.
thank you
Hi Cynthia, i checked your code and found that if i replace proc print in the second page to
ods text='Description';
i will still get the same title1 and title2 from first page.what do you think? maybe command title is not working or i have some problem with word 2013?
thank you
Title1 statement will remain in effect for all output until changed (new TITLE1) or cleared Title1; (which will clear all titles). So maybe add Title1; after the ODS text statement.
Hi, thank you for help. but i put title after ods and then all titles change, also in the first page
Hi, thank you for your help. but you didin't understand me.Cynthia is right, i need different title on page one and page two.
my code is :
options nonumber nodate;
ods rtf file='C:\..........\ControlReportDeveloper.rtf' startpage=no ;
ods escapechar = '~';
title1 j=l '~S={preimage="C:\...........\logo.jpg" }';
title2 j=l height=10pt bold 'Left'
j=r height=12pt bold 'Right';
ods text='Alexey';
title;
ods rtf startpage=now;
title2 justify=left j=l height=10pt bold 'Cilic Champion';
ods text='~{newline 6}';
ods text='~{style[font=(Arial) just=r fontweight=bold fontsize=14pt] Description}';
ods rtf close;
on the first page i get on the header : logo, Left and right and text : Alexey . It's OK
on the second page i still get logo, Left and right (title is not work?) and Description. I had to get header Cilic Champion and text Description.
thank you
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.