BookmarkSubscribeRSS Feed
hjjijkkl
Pyrite | Level 9

I am using ods- proc report to generate a report in rtf and i am having issue with some of the text cutting off. i increased the cell width but, it is not helping. How can i fix this issue ?

7 REPLIES 7
PaigeMiller
Diamond | Level 26

Hello, @hjjijkkl, we can't possibly know what is happening unless you share a portion of your data as SAS data step code (instructions) and your code. Also, this has been requested of you before, we shouldn't have to keep asking, we're trying to help you, so you have to help us as well.

--
Paige Miller
hjjijkkl
Pyrite | Level 9

This is what the data looks like and i am using proc report but, the IQR is cutting off in the rft output. I have tried everything (format the data, decrease the front, increase the cell width)  but its not working. the data isnt truncated and the problem is in proc report

Obs     var        label                    Total                 ctl                       DDR                           Fmt

 

 1     asote    AbRTI                 20                      7                           13                                  n

 2     asote    AbRTI           398.8 (241.5)       445.7 (185.1)         346.1 (297.0)               Mean (SD)

 3     asote    AbRTI           434 (208 - 523)    454 (424 - 508)     284(82.5 - 654)           Median (IQR)

 4     asote    AbRTI            2 - 755                 44 - 755                 2 - 726                       Range

 

 

Reeza
Super User
Reduce your font size, wrap the cell so it goes to a new line, or increase your line width more. Also verify that your data set has the full value and it wasn't truncated earlier.
ballardw
Super User

@hjjijkkl wrote:

I am using ods- proc report to generate a report in rtf and i am having issue with some of the text cutting off. i increased the cell width but, it is not helping. How can i fix this issue ?


Something else to look at: what format is assigned to the variable. If you try to display 20 characters with a $10 format then 10 characters will get cut off.

You may have to examine the data set with proc contents to tell if the format is shorter than the defined length.

Or perhaps it is specified in your code. HINT. HINT. HINT.

 

Here is an example that should demonstrate this sort of behavior.

data junk;
   X="This is a character value that is moderately long";
run;

Proc report data=junk;
   columns x;
   define x /display format=$5. style=[cellwidth=5in];
run;

The cellwidth is much  more than is needed but because the FORMAT limits output to 5 characters it really doesn't help.

Same behavior with

data junk;
   X="This is a character value that is moderately long";
   format x $5.;
run;

Proc report data=junk;
   columns x;
   define x /display  style=[cellwidth=5in];
run;

because the default format for X has been set to 5 characters proc report uses the default format.

If this is case overriding the format would work:

Proc report data=junk;
   columns x;
   define x /display format=$50.  style=[cellwidth=5in];
run;

though you might want to shrink the cellwidth.

 

 

hjjijkkl
Pyrite | Level 9

I tried everything. nothing is working. 

Cynthia_sas
SAS Super FREQ

Hi:

  Without making any adjustments to cellwidth and using only the rows that you posted, I cannot duplicate your experience. In all of these outputs, the (IQR) is showing the complete string -- no truncation and no cellwidth adjustment needed:

Cynthia_sas_0-1622852027772.png

 

  You might need to work with Tech Support on this because they would need to review ALL your code and ALL your data to see if they can help you figure out what is happening.

Cynthia

Reeza
Super User
Please follow the instructions here to provide us sample data and your exact full proc report code to see if we can generate the same issue or you need to work with SAS tech support.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 2454 views
  • 0 likes
  • 5 in conversation