Date: Thu, 22 Apr 2004 20:10:46 -0400
Reply-To: Lou <lpogodajr292185@COMCAST.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Lou <lpogodajr292185@COMCAST.NET>
Subject: Re: proc template and ods
"Don Stanley" <don_stanley@PARADISE.NET.NZ> wrote in message
> PROC REPORT will start a new page for each patient if the patient id field
> is a by group field. Have you tried using a BY in the data step to see if
> that also works there?
Yes I have and no it doesn't. Conventionally in a data step used to write a
report, you'd say something like IF FIRST.XXX THEN PUT _PAGE_; and a page
eject would be written to the file. What seems to be happening in this
situation is that a bunch of blank lines get written to the output table,
but because the table grid takes up page space and the fact that lines can
wrap within a table cell, the linecount doesn't coincide with the physical
I originally wanted to use a data step because it takes some effort to
decide what to print (or not print) for any given variable and it seems more
efficient to just send it to the output destination once that decision is
made rather than send it to another dataset and then code up a PROC REPORT
to print that.
Further, while PROC REPORT honors a split character, when the output is sent
to an rtf file, the split character is not honored - it prints instead.
Either this stuff is not quite ready for prime time, or I'm missing some
vital bit of understanding. I hope it's the second, but I'm afraid it's the
Thanks for the suggestion - do you have any others?
> On Wed, 21 Apr 2004 20:51:51 -0400, Lou <lpogodajr292185@COMCAST.NET>
> >I have a bunch data entered from CRF's, and I'm trying to output that
> >by patient ID. The amount of data for any one patient is variable,
> >depending on the CRF's submitted, and traditional listings are awkward
> >inconvenient to use when you're trying to get a picture of the overall
> >condition of a particular patient. So essentially I need to write a
> >of pages for each patient, showing question and response, but showing
> >the questions that were responded to.
> >Easy enough to do with a data step. More trouble but still doable using
> >PROC REPORT. Either way, the output isn't very "pretty", so when I was
> >going through chapter 5 in the ODS manual (the chapter on PROC TEMPLATE)
> >came to the second example, it looked like just the ticket - here we have
> >table (in html) produced in a data step. I want rtf output, but that's
> >enough to change, and if not I can live with html.
> >However the example produces one page of output. I need to produce a
> >separate table for each patient. A table may run for several pages, but
> >page can have more than one patient on it, and all tables need to be in
> >file. That's easy enough to do by hand in something like Microsoft Word,
> >but I haven't been able to figure out how to finish one table and start
> >another in the same file, or for that matter force a new page (analogous
> >PUT _PAGE_ in a data step) while remaining in the same table. So far,
> >technical support hasn't been able to help, but neither have they said
> >Can anyone help?