The SAS Output Delivery System and reporting techniques

ODS PDF and PROC REPORT - Text flowing into the next observation

Reply
Occasional Contributor
Posts: 11

ODS PDF and PROC REPORT - Text flowing into the next observation

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

Respected Advisor
Posts: 3,799

ODS PDF and PROC REPORT - Text flowing into the next observation

Posted in reply to Andy_Begg

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

Occasional Contributor
Posts: 11

ODS PDF and PROC REPORT - Text flowing into the next observation

Posted in reply to data_null__

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!

Respected Advisor
Posts: 3,799

ODS PDF and PROC REPORT - Text flowing into the next observation

Posted in reply to Andy_Begg

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. 

Occasional Contributor
Posts: 11

ODS PDF and PROC REPORT - Text flowing into the next observation

Posted in reply to data_null__

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

Any other ideas to resolve this conundrum?

Respected Advisor
Posts: 3,799

ODS PDF and PROC REPORT - Text flowing into the next observation

Posted in reply to Andy_Begg

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

Ask a Question
Discussion stats
  • 5 replies
  • 220 views
  • 0 likes
  • 2 in conversation