BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
JansM
Calcite | Level 5

With the attached code we construct our table that is afterwards exported into a *.rtf document.

As you can see we use a format ("cellwidth").

 

the table should cover 100% of the horizontal width. We tried different numbers to get the right width of every cell but we can't figure out how sas allocates / computes the cellwidths. As it is not like we dictate with our format.

 

Is there some experience / advice out there?

 

Thank you in advance

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

For a question like this I would suggest providing some example data, ods destination and options in effect, values for the macro variables and/or remove most of the options that don't have much affect on this appearance such as border colors, borderwidths, font information to reduce the code to the key elements related to the question.

Also if you get any messages in the log that might help.

 

You should also include the actual format, at least enough for the values in the example data. In the format I might look for things that aren't valid for the cellwidth parameter

 

Since the only place I see the $cellwidth format is in a classlev statement what happens if you set a fixed value instead of the format

 

View solution in original post

3 REPLIES 3
ballardw
Super User

For a question like this I would suggest providing some example data, ods destination and options in effect, values for the macro variables and/or remove most of the options that don't have much affect on this appearance such as border colors, borderwidths, font information to reduce the code to the key elements related to the question.

Also if you get any messages in the log that might help.

 

You should also include the actual format, at least enough for the values in the example data. In the format I might look for things that aren't valid for the cellwidth parameter

 

Since the only place I see the $cellwidth format is in a classlev statement what happens if you set a fixed value instead of the format

 

JansM
Calcite | Level 5

thank you for your help!

 

Our problem was mainly that we used ods tagsets.rtf_sample rather than tagsets.rtf.


 

Cynthia_sas
SAS Super FREQ

Hi:

  For an example of using the WIDTH= option, there's an example below. I find that width=100% works, no matter what the destination. For destinations that respect the margin settings (PDF, RTF, PRINTER, TAGSETS.RTF) I find it works better not to "over-control" the width and just use a simple WIDTH=100% on the TABLE statement as shown below. (When I look inside Word, at the margin settings, the margins are correctly set at .5 in all around and the width=100% works as I expect.

 

cynthia

 

set_width.png

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