Help using Base SAS procedures

Proc Report rtf

Reply
Contributor
Posts: 37

Proc Report rtf

[ Edited ]

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?

Super User
Posts: 23,778

Re: Proc Report rtf

Posted in reply to nirali514

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

Contributor
Posts: 37

Re: Proc Report rtf

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?

Super User
Posts: 23,778

Re: Proc Report rtf

Posted in reply to nirali514

 

 

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. 

 

 

Contributor
Posts: 37

Re: Proc Report rtf

Thank you!
Contributor
Posts: 37

Re: Proc Report rtf

I am asking if it is possible to add text in a proc report that is independent of a table.
Super User
Posts: 13,583

Re: Proc Report rtf

Posted in reply to nirali514

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.

Ask a Question
Discussion stats
  • 6 replies
  • 211 views
  • 2 likes
  • 3 in conversation