BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
mcook
Quartz | Level 8

Using proc report and ODS Tagsets.RTF in Enterprise Guide:

 

Given a simple table such as :

Capture1.PNG

Is it possible to generate headers to match the following:

 

Capture.PNG

 

Spanning Header 3  and Spanning Header 4 are straightforward. 

Question1: is it possible to merge the headers of 2 columns (ID1 and ID2  as Identifiers above) into a single , regular header?

Question2: is it possible to merge spanning (and regular) headers vertically?  As in the Identifiers and Value Headers above? 

 

I have been unable to merge the header across 2 columns (as in ID1 and ID2).

But i have been able to get a slight approximation of the vertical spanning, by creating empty 'dummy headers' with the appropriate borders set the same shade as the background. But they are not actually spanning, and entering text in them is problematic.

 

its a small effort to adjust a table manually after its generated as an RTF File, but with many tables it is just a time sink.  If there is anyway possible SAS is capable of doing either of these tasks,  I would love to know how.  

 

Thanks in advance.  

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  PROC REPORT is really geared to doing spanning headers horizontally. PROC REPORT writes only 1 report row at a time, so when it is writing the second header row, for spanning header 3, it does not have the ability to back and do vertical merging above ID1 and ID1 or vertical merging for VALUE.

  However, although the Report Writing Interface might allow you to do the type of vertical merging you envision, that would be a whole new syntax AND the challenge with the Report Writing Interface is that it is only supported by PDF and HTML destinations right now.

  Since you didn't post your code, I used some fake data and used this PROC REPORT to show the best that I think PROC REPORT can do for you compared to the Report Writing Interface (RWI):

rwi_example.png

The RWI allows you control the row spanning and the column spanning for report headers and for data cells, but if you must have RTF, then this may not be an option for you.

Cynthia

Cynthia_sas_0-1670612848263.png

 

View solution in original post

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:

  PROC REPORT is really geared to doing spanning headers horizontally. PROC REPORT writes only 1 report row at a time, so when it is writing the second header row, for spanning header 3, it does not have the ability to back and do vertical merging above ID1 and ID1 or vertical merging for VALUE.

  However, although the Report Writing Interface might allow you to do the type of vertical merging you envision, that would be a whole new syntax AND the challenge with the Report Writing Interface is that it is only supported by PDF and HTML destinations right now.

  Since you didn't post your code, I used some fake data and used this PROC REPORT to show the best that I think PROC REPORT can do for you compared to the Report Writing Interface (RWI):

rwi_example.png

The RWI allows you control the row spanning and the column spanning for report headers and for data cells, but if you must have RTF, then this may not be an option for you.

Cynthia

Cynthia_sas_0-1670612848263.png

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1 reply
  • 487 views
  • 0 likes
  • 2 in conversation