LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (September 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 17 Sep 2008 12:55:29 -0400
Reply-To:     "Howard Schreier <hs AT dc-sug DOT org>"
              <schreier.junk.mail@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Howard Schreier <hs AT dc-sug DOT org>"
              <schreier.junk.mail@GMAIL.COM>
Subject:      Re: Getting diff titles for specific observations using ODS RTF
              and PROC REPORT

On Wed, 17 Sep 2008 10:54:09 -0400, Tom Hide <tom.hide@DEHIWORLD.COM> wrote:

>Have you tried using #byval? > >Eg Title "Sample txt #byval(id)"; > >proc report data=xxx ...; >by id; >... > >quit; > >This will produce a separate report for each value of ID. Ensure data is >sorted by ID, and the appropriate ID will be shown in the title for each ID > >If you need more sophisticated titles, then you may need to do this within >a macro, but try this first.

I think a view will suffice; no need for macro.

> >Cheers > >Tom > >On Mon, 15 Sep 2008 02:48:04 -0700, Frank Poppe ><Frank.Poppe@PWCONSULTING.NL> wrote: > >>On Sep 12, 10:14 pm, maverick2 <phekuch...@gmail.com> wrote: >>> I have the following issue: >>> >>> I have a dataset with n variables. This dataset is obtained from 5 >>> different datasets, A, B, C, D, and E each having a unique identifier >>> value. e.g. Dataset A has a variable ID =?A?, for Dataset B the ID = >>> ?B?, etc. All these individual datasets have the same variables, so I >>> have set them and got the final dataset. Now I want to use ods rtf >>> statement and in it, PROC REPORT to report this final dataset, but in >>> such a way that ? >>> 1. Each dataset has its unique title. eg. ?dataset A? and so on. More >>> clearly, the output rtf file should have the title ?Dataset A? on all >>> the pages that have observations from dataset A and so on. >>> 2. In the rtf file, when the first dataset observations are over, the >>> second dataset records should start from a new page. So, the first >>> record/observation for every dataset should be on a new page, of >>> course with the changed title. >>> 3. I also have a requirement for a unique footer for each dataset, >>> but I guess that would work the same way as the title. >>> >>> Is there any way of doing this? >> >>If is not possible to change the content of the SAS TITLE's and >>FOOTNOTE's in the middle of a PROC. >> >>For some output destinations you can get something similar by using >>PROC REPORT options. I guess a combination of using a DEFINE statement >>to designate your ID variable as a GROUP definition together with a >>COMPUTE BEFORE _PAGE_ block with LINE statements would come close. >> >>But for an RTF destination the final formatting is done by the >>application that manages the RTF file. Only then the page breaks are >>determined. Within the RTF produced by SAS there are no pages except >>the ones that are explicitly added (e.g. between the groups you have >>defined). >>The way out is to use the LINE statements in a COMPUTE BEFORE ID block >>to insert escaped RTF-code to change the header and footer texts >>within RTF. I've seen examples of that, but it requires some hacking. >>It will be something like "{\header your text}". >> >>Frank Poppe >>PW Consulting >>the Netherlands


Back to: Top of message | Previous page | Main SAS-L page