BookmarkSubscribeRSS Feed
craig159753
Quartz | Level 8

Hi,

 

So I have two very simple PROC REPORT procedures (two different programs) within some ODS RTF lines, one program creates a 3 page RTF file and the other creates a single page RTF file. PROC REPORT is as below:

 

        proc report data=input nowd headline headskip center split='#';
            column page pagec order1 order2 text1 stats1;

             define page     / order order=internal noprint;
             define pagec    / order order=internal noprint;

             define order1   / order order=internal noprint;
             define order2   / order order=internal noprint;

             define text1    / order style(header) = {just=left cellwidth=13.0cm}
                                     style(column) = {just=left}
                                     " ";

             define stats1  / display style(header) = {just=center cellwidth=2.0cm asis=on}
                                       style(column) = {just=center vjust=bottom}
                                       "Events";

             compute before page;
                 line " ";
             endcomp;
             compute after order1;
                 line " ";
             endcomp;

             compute after _page_ / style = {just=left font_weight=bold borderbottomstyle=hidden};
                 line " ";
                 line @1 pagec $200.;
             endcomp;

             break after page / page;
        run;


The variable PAGEC is just some text which needs to be printed at the bottom of all pages within the RTF files, but oddly the value of PAGEC is not printing and instead a blank line is being printed. Any help?

 

Thanks

Craig

3 REPLIES 3
Jagadishkatam
Amethyst | Level 16

Please try to use the below like 'compute after _page_'

 

             compute after _page_ / style = {just=left font_weight=bold borderbottomstyle=hidden};
                 line " ";
                 line @1 pagec $200.;
             endcomp;
Thanks,
Jag
craig159753
Quartz | Level 8
Hi Jagadishkatam,

Thanks for the suggestion, that is a typo in the above code (I cannot edit the post), the source code is actually _PAGE_. I was doing testing and both PAGE and _PAGE_ just prints blank lines.

Thanks
Craig
ballardw
Super User

Data.

 

Hard to see results or test code without data.

 

Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the <> icon or attached as text to show exactly what you have and that we can test code against.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1011 views
  • 0 likes
  • 3 in conversation