BookmarkSubscribeRSS Feed
Alexey
Calcite | Level 5

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

8 REPLIES 8
Ksharp
Super User

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

Ksharp
Super User

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

Cynthia_sas
SAS Super FREQ

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;


valid_values_startpage.pngstartpage_now_works.png
Alexey
Calcite | Level 5

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

Alexey
Calcite | Level 5

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

ballardw
Super User

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.

Alexey
Calcite | Level 5

Hi, thank you for help. but i put title after ods and then all titles change, also in the first page

Alexey
Calcite | Level 5

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 1428 views
  • 0 likes
  • 4 in conversation