BookmarkSubscribeRSS Feed
Andy_Begg
Calcite | Level 5

Hi All,

I am creating multiple PDF reports based on my users log-on ID's.

Each user report is in the same structure and contains a comments field along with various other variables.

The comments field contains quite a few long comments and I've noticed that mysteriously the text sometimes flows over into the next oberservation in the report! Obviously making the text illegible.

Each observation in my dataset can have up to three users as the "owner" so this observation will be outputted to each separate user report where applicable.

The text flowing into the next observation is consistent for each users report, it happens in the same place, but when said observation is outputted to another user's report it's fine and the problem occurs on a totally different observation.

Any help with pinpointing why this is happening would be greatly appreciated.

This is occuring on SAS 9.1.3 SP 4

Regards

Andy

5 REPLIES 5
data_null__
Jade | Level 19

I'm going to guess that your text contains control characters that are causing the problem.  Try using COMPRESS with the 'C' modifier to remove control characters from the long comment fields and see if that makes a difference.

COMPRESS(<source><, chars><, modifiers>)

Andy_Begg
Calcite | Level 5

Yes my data does include control characters. The data originates from Excel and I can see the control characters in the viewtable following the import.

I will try your suggestion. Thanks!

How do you explain the same observation behaving differently on the different reports though? The overflow happens on one observation in user A's PDF report but the same observation on user B's PDF is output correctly and the overflow happens somewhere else.

Thanks in advance!

data_null__
Jade | Level 19

Andy_Begg wrote:

How do you explain the same observation behaving differently on the different reports though? The overflow happens on one observation in user A's PDF report but the same observation on user B's PDF is output correctly and the overflow happens somewhere else.



I don't I said I was guessing. 

Andy_Begg
Calcite | Level 5

I tried the compress function and removed the control characters and the problem still persists.

Any other ideas to resolve this conundrum?

data_null__
Jade | Level 19

You will need to show an example.  Including DATA and CODE so "we" can reproduce the problem.

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!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1184 views
  • 0 likes
  • 2 in conversation