BookmarkSubscribeRSS Feed
Scooby_Drew
Calcite | Level 5
I am using the following code to create a Report and wrap the 'Investigation_summary' field around the bottom instead of being a chunk on the side.

ods pdf file="/user01/ufraud/adhoc_download/db_sim.pdf";
proc report data=URFI.DERIC_REPORT_SIM_CASES_OPEN;
column INVESTIGATOR CRN STAFF_NAME UNIT_NAME DATE_STARTED HANDOVER_DATE days_from_start days_from_handover
potential_loss actual_loss INVESTIGATION_SUMMARY;
define INVESTIGATOR / order group noprint;
define CRN / order 'Case Number' width = 8;
define STAFF_NAME / order 'Staff Name' width = 30;
define UNIT_NAME / order 'Branch Name' width = 30;
define DATE_STARTED / order 'Date Started';
define HANDOVER_DATE / order 'Handover Date';
define days_from_start / order 'Days -> Start' width = 8;
define days_from_handover / order 'Days -> Handover' width = 8;
define potential_loss / order 'Potential Loss';
define actual_loss / order 'Actual Loss';
define INVESTIGATION_SUMMARY / order noprint;
break after INVESTIGATOR / page;
break after INVESTIGATION_SUMMARY / ul;
compute after INVESTIGATION_SUMMARY;
line @1 INVESTIGATION_SUMMARY $7000.;
endcomp;
compute before _page_;
line @1 'INVESTIGATOR:' INVESTIGATOR $30.;
endcomp;
run;
ods pdf close;

The field in question as you will see can hold 7000 characters. When the commentary in the field is short, it produces a nice block on the pdf that has the 9 variables at the top with the commentary wrapping nicely below it. However if the commentary is longer it starts to break the block up so that there are just two variables abovethe commentary, with theis being repeated below that until all variables are shown. I'm not sure if I have explained this properly- can anyone help me?

Drew
1 REPLY 1
ScottH_SAS
SAS Employee
Have you tried the UNIFORM option. Here is a snippet from support.com

Uniform - for multiple page tables, ensures uniformity from page to page within a single table. When the UNIFORM option is in effect, ODS reads the entire table before it starts to print it so that it can determine the column widths that are necessary to accommodate all the data. These column widths are applied to all pages of a multiple page table.

There are some memory constraints when using large files so read the documentation carefully to fully understand the ramifications.

Hope this helps!
Scott

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1 reply
  • 937 views
  • 0 likes
  • 2 in conversation