BookmarkSubscribeRSS Feed
SASUserMD
Obsidian | Level 7

Hello,

 

I got a problem with "ods rtf text". I want a text (using ods rtf text) on the first page of my output. Her is an example:

 

 

ODS ESCAPECHAR ='~';
ods rtf startpage=no notoc_data;
title1 j=l 'Project' j=r 'page ~{PAGEOF}'; 
title2 j=l 'Text on first page';

	ods rtf startpage=now;
	ods rtf text="Text on first page"; 

ods rtf startpage=now;

title2 j=l 'Analysis'; 
title3 j=l '1. Origin'; 

	PROC TABULATE data=sashelp.cars;
		class Origin;  
		table Origin,(N pctn='%'*F=4.1); 
	RUN;  

ods rtf startpage=now;

title3 j=l '2. DriveTrain'; 
ods rtf text="~S={outputwidth=100% just=l} {\tc\b\f3\fs0\cf8 2. DriveTrain}"; 

	ods rtf text="It's working on each other page, but not the first"; 

ods rtf close;

 

There is always the table immediately after my text. I want the text on the first and the table on the second page.

 

Hope you can help me.

 

Martin

 

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

I would not use ods text for that.  Put the text you want to apper on the first page in a dataset, then proc report that data, you can supress labels by putting a space and drop borders and get the text you want on page 1.  

SASUserMD
Obsidian | Level 7

Sounds good. But I have to use ods rtf text. Is it possible to create an invisible table/report?

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Ah, that old chestnut "But I have to use"...

 

Yes, you can create reports which don;t look like reports, set borders to none for instance, set labels to " ".

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
  • 3 replies
  • 874 views
  • 0 likes
  • 2 in conversation