Date: Tue, 29 Nov 2005 08:31:58 -0800
Reply-To: chris@OVIEW.CO.UK
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: chris@OVIEW.CO.UK
Organization: http://groups.google.com
Subject: Re: Deleteing blank lines in proc report
In-Reply-To: <1133270329.836110.97600@g47g2000cwa.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi Phil,
This isn't possible using a compute block, so far as I know. Clearly,
the compute block will run every time the value of bin changes, and (as
you may already have discovered), you can't make a 'line' statement in
a compute block optional - your code will always output a line every
time bin changes, and all you can control is whether the line is blank
or contains some text (or tags etc).
Two solutions come to mind - one is to post-process the output file,
the other is to add a new control variable to the PROC REPORT.
Post-processing is the less elegant solution in my opinion but can be
quick to implement - just output some sort of marker text like "DELETE
ME" when bin is not 0 or 1, and then read the HTML file back in and
delete those lines.
The more elegant solution is to add another control variable - in other
words, create a new variable on your dataset whose value only changes
when (first.bin and bin in (0, 1)) - you can then change your compute
block to reference the new variable.
Hope this helps,
Chris.
--------------------------------------------------------
Elvis SAS Log Analyser - http://www.oview.co.uk/elvis
--------------------------------------------------------
|