BookmarkSubscribeRSS Feed
nirali514
Obsidian | Level 7

Is it possible to add a paragraph before and after a table that is being created by proc report? The text would be a 3/4 sentence paragraph, so longer than a title or footnote. Is there then a way to format this paragraph (ie, font and size)?

 

Is there a sample code for this?

6 REPLIES 6
Reeza
Super User

I'm assuming you don't have a question here.

nirali514
Obsidian | Level 7

I am not sure why my orginal question had a line through it. sorry please see below.

 

Is it possible to add a paragraph before and after a table that is being created by proc report? The text would be a 3/4 sentence paragraph, so longer than a title or footnote. Is there then a way to format this paragraph (ie, font and size)?

 

Is there a sample code for this?

Reeza
Super User

 

 

You have lines through it because you accidentally selected 'strike through' for some reason. It's the fourth icon in the Rich Text editor. 

There's probably also a keyboard shortcut similar to CTRL+B for bold or i for italic. 

 

Also, you can edit your posts. See the gear icon in the top right hand corner, rather than reposting your question. I've fixed it for you now. 

 

You can use ODS TEXT= and/or PROC ODSTEXT to display text in your reports. ODS TEXT allows for styling, not sure about ODSTEXT it's relatively new. 

 

If you search those topics you'll find examples. 

 

 

nirali514
Obsidian | Level 7
Thank you!
nirali514
Obsidian | Level 7
I am asking if it is possible to add text in a proc report that is independent of a table.
ballardw
Super User

@nirali514 wrote:
I am asking if it is possible to add text in a proc report that is independent of a table.

I think that you may want to investigate Proc ODSText. You can either specify explicit text, use a data set with text, or combine elements of both.

 

proc odstext;
   p 'You can use the ODSTEXT procedure to add paragraphs
      and lists to your output.';
   p 'You can also format your text.' / style=[color=red fontsize=25pt];
   p 'This slide shows output created by PROC GMAP.' 
                                     / style=[color=purple fontsize=30pt];
run;

shows an example of 3 paragraphs (the p) with different formats. The online example I borrowed this from is prior to a GMAP output hence the text.

 

You would use a separate proc odstext call before and after the proc report call.

There is another procedure ODSLIST if your output looks more like a bullet list that may be of use as well.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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