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-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!

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
  • 5 replies
  • 861 views
  • 0 likes
  • 2 in conversation