The SAS Output Delivery System and reporting techniques

Proc Report -with no columns and Page Numbers

Reply
Occasional Contributor
Posts: 8

Proc Report -with no columns and Page Numbers

Hi All,

        I have two issue ,

1) Want to get rid of Column from the reporting table. I used style(report)=[rules=rows frame=box]. Due to what ever the reason the column is showing up in the header. Any idea  , how I can get rid of it.

2) I am working on patient profile. so , I have to print tables below each other instead of one table in a page. Because of that I am using startpage=no optoin. I do not know, how can I incorporate page number(Page X of Y) for this report.

I would really appreciate your feedback on this topic.

 

Medical

History

 

Diagnosis

 

Start

Date

 

End

Date

 

Ongoing?

 

Grade

 

FATIGUE

03 OCT 2013 Yes Grade

1

Super User
Super User
Posts: 7,686

Re: Proc Report -with no columns and Page Numbers

Hi,

1) I wasn't sure which "Column" you were referring to.  Generally speaking though to mit something from the output have:

define column / noprint;

2) Well, rarely do I go straight to PDF, but it should be the same as for RTF:

ods escaechar="^";

footnote1 j=r "Page ^{thispage} of ^{lastpage}";

Occasional Contributor
Posts: 8

Re: Proc Report -with no columns and Page Numbers

Thanks RW9.

1) I was referring to the column lines next to diagnosis, start date etc. Noprint option will suppress the value of the column itself.  I want to supress the column line alone.

2) so, thispage and lastpage is it part of macro. I have several Proc report statement to generate multiple tables in one file as I have shown above.

Super User
Super User
Posts: 7,686

Re: Proc Report -with no columns and Page Numbers

Ok.

1)  Then that's the label:

define column / ' ';

So put a space between two quotes.

2) No, the ^{} means its an escape sequence.  The thispage and last page are control words recognized in the target application.  These are nothing to do with how many proc outputs there are.  So taking RTF as an example, in the output text the {thispage} appears, however when Word reads this file in it knows that this is a control word and replaces it with the current count of pages.  Same thing with PDF except at creation time these are coded in.

Occasional Contributor
Posts: 8

Re: Proc Report -with no columns and Page Numbers

Hi RW9,

           If you look at the headers above I pasted. It has vertical line between diagnosis,start date,end date etc. I want to get rid of the vertical line.

Super User
Super User
Posts: 7,686

Re: Proc Report -with no columns and Page Numbers

Oh yes.  I don't really have time now as leaving, however have a look at setting borderwidths/colours in the top:

proc report style(header)=[background=gray borderrightwidth=0 borderrightcolor=lightblue]

one of those border style attributes should get rid of the line.

Occasional Contributor
Posts: 8

Re: Proc Report -with no columns and Page Numbers

Hi RW9,

          I tried the borderrightwidth and borderrightcolor, it changes the color to lightblue only in the right side. I want all the lines between the cell to be changed as well. Any idea.

Occasional Contributor
Posts: 8

Re: Proc Report -with no columns and Page Numbers

I was able to mask the white line with left and right border width and color statement. I think that will work unless you have any other idea. Thanks for all your help.

Occasional Contributor
Posts: 8

Re: Proc Report -with no columns and Page Numbers

Hi RW9,

2) Page number worked great with

footnote1 j=r "Page ^{thispage} of ^{lastpage}";  , Thanks so much for that.

1) The only issue left is the column issue. If anybody can help me that, I would really appreciate it.

SAS Super FREQ
Posts: 8,815

Re: Proc Report -with no columns and Page Numbers

Hi:

  See the screen shot. The simple borderspacing=0 worked for me without changing the left and right borders. I just used SASHELP.CLASS and ODS PDF.

cynthia


borderspacing_impact_report.png
Occasional Contributor
Posts: 8

Re: Proc Report -with no columns and Page Numbers

Thanks Cynthia. Unfortunately I cannot see the screen shot. But I will try this.

Thanks,

Satish

SAS Super FREQ
Posts: 8,815

Re: Proc Report -with no columns and Page Numbers

Hi:

  Here is the code I ran. It was in the screen shot with the output.

Cynthia

ods pdf file='c:\temp\testcolumns.pdf';

  title; footnote;

  proc report data=sashelp.class nowd

       style(report)={rules=rows frame=box borderspacing=0};
        

  columns ("Medical History" name age sex height weight);

  run;

ods pdf close;

Occasional Contributor
Posts: 8

Re: Proc Report -with no columns and Page Numbers

Thanks Cynthia. That works great.

Satish

Ask a Question
Discussion stats
  • 12 replies
  • 970 views
  • 0 likes
  • 3 in conversation