The SAS Output Delivery System and reporting techniques

SAS proc report to PDF , truncating text

Reply
Contributor
Posts: 57

SAS proc report to PDF , truncating text

I am trying to output to the following proc report to a  PDF file using the following code.  However my narrative variable  gets truncated if it is longer than one PDF page. One page is fine but if it spans over two pages it is truncated at the end of the first page. Does anyone have any help on how to stop the truncation of the narrative field.

Many thanks.


proc report data=patient headline headskip split='\' nowd;

where casenumber=&casenum;

column casenumber narrative comment_text abbrev_narrative seriousness_desc serious_notes causality

    agent_notes listedness listedness_notes outcome_desc;

define casenumber / order id noprint;

define narrative / display  width=50 'Narrative' flow;

define comment_text / display  width=50  Analysis Statement' flow;

define abbrev_narrative / display  width=40 Comment' flow page;

define seriousness_desc         / display  width=20 'Case Seriousness';

define serious_notes         / display  width=20 'Notes' flow;

define causality     / display  width=10 'Case Causality';

define agent_notes     / display  width=20 'Notes' flow;

define listedness     / display  width=14 'Listedness Determination';

define listedness_notes / display  width=20 'Notes' flow;

define outcome_desc / display  width=20 'Case Outcome' page;

compute before _page_;

line @3 'CASE ASSESSMENT';

line @4 ' ';

endcomp;

ods pdf startpage=now;

%macro loop(list=);

%if %sysfunc(exist(work.check1)) %then %do;

%* Initialize loop;

%let i=1;

%let casei=%scan(&list,&i,str(,));

%* Run loop;

%do %while (&casei ne);

dm 'odsresults; clear';

ods listing close;

options papersize=a4 leftmargin=3.5 cm rightmargin=3.5 cm;

ods pdf file = "C:\temp\CaseNumber &casei..pdf" style = sasweb;

ods escapechar='~';

footnote1 j=c 'Page ~{thispage} of ~{lastpage} ';

footnote2 j=r 'Report Generated on ' &sysdate9;

ods pdf startpage=no;

%* Do processing for this iteration of the loop;

   %put PROCESSING CASE NUMBER &casei;

   %casereport(casenum=&casei);

   %* Prepare for next iteration of the loop;

   %let i=%eval(&i+1);

   %let casei=%scan(&list,&i,str(,));

ods pdf close;

ods listing;

%end;

%end;

%else %do;

%display logonerror;

%end;

dm 'odsresults; clear';

%mend loop;

SAS Super FREQ
Posts: 8,743

Re: SAS proc report to PDF , truncating text

Hi:

Without data, or the full program, it is very hard to make a constructive comment. If truncation is occuring, it is related to the actual data using your actual program. It might be to your benefit to contact Tech Support and open a track. They could look at ALL of your program and use it with your data in order to help you debug your issue.

cynthia

Ask a Question
Discussion stats
  • 1 reply
  • 411 views
  • 0 likes
  • 2 in conversation