<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PDF REPORT in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69303#M7971</link>
    <description>Hi Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
THere won't be a case with zero kids.&lt;BR /&gt;
Each name will have non zero number kids.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Jason</description>
    <pubDate>Thu, 09 Sep 2010 19:12:05 GMT</pubDate>
    <dc:creator>JasonNC</dc:creator>
    <dc:date>2010-09-09T19:12:05Z</dc:date>
    <item>
      <title>PDF REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69293#M7961</link>
      <description>Hi SAS People,&lt;BR /&gt;
&lt;BR /&gt;
I have the following report layout.&lt;BR /&gt;
&lt;BR /&gt;
Report:xxx   Company Name  Date : MMDDYYYY&lt;BR /&gt;
code:xxx       xxxxxxx     page  : 1&lt;BR /&gt;
                                   &lt;BR /&gt;
&lt;BR /&gt;
NAME: XXXXXXXXXXXX&lt;BR /&gt;
ID:XXXXX&lt;BR /&gt;
&lt;BR /&gt;
KIDSNAME SEX AGE &lt;BR /&gt;
xxxxxx   x   xx     More variables continue&lt;BR /&gt;
xxxxxx   x   xx&lt;BR /&gt;
&lt;BR /&gt;
NAME: XXXXXXXXXXXX&lt;BR /&gt;
ID: XXXXX&lt;BR /&gt;
&lt;BR /&gt;
KIDSNAME SEX AGE&lt;BR /&gt;
xxxxxxxx x   xx      More variables continue&lt;BR /&gt;
xxxxxxx  x   xx&lt;BR /&gt;
&lt;BR /&gt;
I am trying to create the above report in PDF and each page should has page numbers like in the above layout.&lt;BR /&gt;
The Report and code should be left side of the page and the company name should be in the center and date and page fileds should be right side of the page.&lt;BR /&gt;
And in the last page the footnote should say " END".&lt;BR /&gt;
We use proc report for most of the reports.&lt;BR /&gt;
But for this report I am really lost and couldnt get any ides.&lt;BR /&gt;
&lt;BR /&gt;
So, I would really appreciate any help.&lt;BR /&gt;
&lt;BR /&gt;
Jason.&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: JasonNC

Message was edited by: JasonNC</description>
      <pubDate>Thu, 02 Sep 2010 02:49:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69293#M7961</guid>
      <dc:creator>JasonNC</dc:creator>
      <dc:date>2010-09-02T02:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: PDF REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69294#M7962</link>
      <description>Hi:&lt;BR /&gt;
  What does your data look like???? This report probably -could- be done with PROC REPORT or it could be done with the pre-production DATA step interface to ODS  (still experimental) or it might be able to be done with PUT _ODS_ statements.&lt;BR /&gt;
 &lt;BR /&gt;
  It also depends on what destination you are interested in. You say you want PDF -- you could create this file using "classic" PUT statements with DATA _NULL_ and then distill the LISTING report manually to PDF using Adobe Acrobat or some 3rd party tool&lt;BR /&gt;
&lt;BR /&gt;
  For an idea of a possible approach with PROC REPORT, review the code and output below. Note that the report dataset was created directly with an INFILE statement -- you would have to take your data and manipulate it to be in a similar structure. It is the TYPE variable that determines what rows are shown in BOLD when the value of TYPE=HDR. The PGNUM, GRPNUM and LN_NUM variables are important because they ensure that all the "header" lines and "data" lines appear in the correct order. I only made 3 columns in the fake data and you could have more columns -- they would just need to be manipulated in the same way. I used an explicit PGNUM variable so that any "family" would not split across pages. That meant I had to create the report at least 1 time and visually inspect the report to see where the manual "break" needed to be.&lt;BR /&gt;
&lt;BR /&gt;
  Turning off the interior table lines with the STYLE override removes the interior lines; the NOHEADER option turns off all the TABLE headers, so it looks as though the fake headers in your data are the only headers there are; and the TITLE statements with J=L, J=C and J=R take care of the titles the way you want. ODS PDF TEXT= is used for the text string at the end of the report.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
Data ReportFile;&lt;BR /&gt;
  length pgnum grpnum ln_num idval 8 type $8 col1 col2 col3 $35;&lt;BR /&gt;
  infile datalines dsd dlm=',' missover;&lt;BR /&gt;
  input pgnum grpnum ln_num type $ IDval col1 $ col2 $ col3 $;&lt;BR /&gt;
return;&lt;BR /&gt;
datalines;&lt;BR /&gt;
1,1, 10,  hdr,  12345,IDSNAME,  SEX,  AGE&lt;BR /&gt;
1,1, 11,  data, 12345,"John Doe", M, 45&lt;BR /&gt;
1,1, 12,  data, 12345,"Jane Doe", F, 44&lt;BR /&gt;
1,1, 13,  brk,  12345, ".", ".", "."&lt;BR /&gt;
1,1, 14,  data, 12345,"NAME:", "Doe Family","."&lt;BR /&gt;
1,1, 15,  data, 12345,"ID:", 12345,"."&lt;BR /&gt;
1,1, 16,  brk,  12345, ".", ".", "."&lt;BR /&gt;
1,1, 17,  hdr,  12345,KIDSNAME, SEX, AGE&lt;BR /&gt;
1,1, 18,  data,  12345,John,     M,   14&lt;BR /&gt;
1,1, 19,  data,  12345,Mary,     F,   12&lt;BR /&gt;
1,1, 20, data,  12345,Billie,   M,   10&lt;BR /&gt;
1,2, 10,  hdr,  22345,IDSNAME,  SEX,  AGE&lt;BR /&gt;
1,2, 11,  data, 22345,"Fred Flintstone", M, 45&lt;BR /&gt;
1,2, 12,  data, 22345,"Wilma Flintstone", F, 44&lt;BR /&gt;
1,2, 13,  brk,  22345, ".", ".", "."&lt;BR /&gt;
1,2, 14,  data, 22345,"NAME:", "Flintstone Family","."&lt;BR /&gt;
1,2, 15,  data, 22345,"ID:", 22345,"."&lt;BR /&gt;
1,2, 16,  brk,  22345, ".", ".", "."&lt;BR /&gt;
1,2, 17,  hdr,  22345,KIDSNAME, SEX, AGE&lt;BR /&gt;
1,2, 18,  data,  22345,Pebbles,   F,   4&lt;BR /&gt;
1,3, 10,  hdr,  32345,IDSNAME,  SEX,  AGE&lt;BR /&gt;
1,3, 11,  data, 32345,"John Walton", M, 45&lt;BR /&gt;
1,3, 12,  data, 32345,"Olivia Walton", F, 44&lt;BR /&gt;
1,3, 13,  brk,  32345, ".", ".", "."&lt;BR /&gt;
1,3, 14,  data, 32345,"NAME:", "Walton Family","."&lt;BR /&gt;
1,3, 15,  data, 32345,"ID:", 32345,"."&lt;BR /&gt;
1,3, 16,  brk,  32345, ".", ".", "."&lt;BR /&gt;
1,3, 17,  hdr,  32345,KIDSNAME, SEX, AGE&lt;BR /&gt;
1,3, 18,  data,  32345,John ,    M,   14&lt;BR /&gt;
1,3, 19,  data,  32345,"Mary Ellen",   F,   12&lt;BR /&gt;
1,3, 20, data,  32345,Jason,   M,   10&lt;BR /&gt;
1,3, 21, data,  32345,Erin,    F,   8&lt;BR /&gt;
1,3, 22, data,  32345,Ben,     M,   6&lt;BR /&gt;
2,4, 10,  hdr,  22345,IDSNAME,  SEX,  AGE&lt;BR /&gt;
2,4, 11,  data, 42345,"Ricky Ricardo", M, 45&lt;BR /&gt;
2,4, 12,  data, 42345,"Lucy Ricardo", F ,44&lt;BR /&gt;
2,4, 13,  brk,  42345, ".", ".", "."&lt;BR /&gt;
2,4, 14,  data, 42345,"NAME:", "Ricardo Family","."&lt;BR /&gt;
2,4, 15,  data, 42345,"ID:", 42345,"."&lt;BR /&gt;
2,4, 16,  brk , 42345, ".", ".", "."&lt;BR /&gt;
2,4, 17,  hdr , 42345,KIDSNAME, SEX, AGE&lt;BR /&gt;
2,4, 18,  data, 42345, Lucy,   F ,  6&lt;BR /&gt;
2,4, 19,  data,  42345,Ricky ,  M ,  4&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
       &lt;BR /&gt;
ods listing;&lt;BR /&gt;
proc print data=ReportFile;&lt;BR /&gt;
  title 'What is structure of dataset for PROC REPORT';&lt;BR /&gt;
run;&lt;BR /&gt;
                                 &lt;BR /&gt;
options nodate nonumber;&lt;BR /&gt;
title; footnote;&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
ods pdf file='c:\temp\reportspecial.pdf';&lt;BR /&gt;
ods escapechar='^';&lt;BR /&gt;
                                                                                       &lt;BR /&gt;
%let repdate = %sysfunc(today(),mmddyy10.); &lt;BR /&gt;
title j=l "Report: xxx" j=c "Company Name" j=r "Date: &amp;amp;repdate";&lt;BR /&gt;
title2 j=l "code: xxx" j=c "xxxxxxx" j=r "^{thispage}";&lt;BR /&gt;
                             &lt;BR /&gt;
proc report data=reportfile nowd noheader&lt;BR /&gt;
  style(report)={rules=none frame=void cellspacing=0};&lt;BR /&gt;
  column pgnum grpnum  ln_num  IDval type col1 col2 col3 ;&lt;BR /&gt;
  define pgnum / order noprint;&lt;BR /&gt;
  define grpnum / order noprint;&lt;BR /&gt;
  define ln_num / order noprint missing;&lt;BR /&gt;
  define IDval / order noprint;&lt;BR /&gt;
  define type / display noprint;&lt;BR /&gt;
  define col1 / display;&lt;BR /&gt;
  define col2 / display;&lt;BR /&gt;
  define col3 / display;&lt;BR /&gt;
  break after pgnum / page;&lt;BR /&gt;
  compute after grpnum;&lt;BR /&gt;
    line ' ';&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
  compute col1;&lt;BR /&gt;
    if col1 in ('NAME:', 'ID:') then do;&lt;BR /&gt;
      call define(_COL_,'style','style={font_weight=bold}');&lt;BR /&gt;
    end;&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
  compute col3;&lt;BR /&gt;
    if type = 'hdr' then do;&lt;BR /&gt;
      call define(_ROW_,'style','style={font_weight=bold}');&lt;BR /&gt;
    end;&lt;BR /&gt;
    else if type = 'brk' then do;&lt;BR /&gt;
      call define(_ROW_,'style','style={foreground=white background=white}');&lt;BR /&gt;
    end;&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
run;&lt;BR /&gt;
                     &lt;BR /&gt;
ods pdf text='^S={just=c font_weight=bold font_size=18pt}^_^5nEnd of Report';&lt;BR /&gt;
                 &lt;BR /&gt;
ods pdf close;&lt;BR /&gt;
                                   &lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 02 Sep 2010 05:29:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69294#M7962</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-09-02T05:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: PDF REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69295#M7963</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Here is the input dataset.&lt;BR /&gt;
Name ID Kidsname Sex Age&lt;BR /&gt;
abc    100  x       F    10&lt;BR /&gt;
abc    100  y       M 15&lt;BR /&gt;
xyz     101 x       F 11&lt;BR /&gt;
xyz     102 y       M 15&lt;BR /&gt;
goes on;&lt;BR /&gt;
 &lt;BR /&gt;
And i need headers also . In the report &lt;BR /&gt;
first row Name filed and second row Id filed then&lt;BR /&gt;
the other 3 fileds header like Kidsname Sex and Age and under these the values.&lt;BR /&gt;
&lt;BR /&gt;
Then some space and  then next Name filed and in the next line&lt;BR /&gt;
again ID field&lt;BR /&gt;
and the other 3 fields Kidsname, sex and age&lt;BR /&gt;
follows</description>
      <pubDate>Thu, 02 Sep 2010 17:02:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69295#M7963</guid>
      <dc:creator>JasonNC</dc:creator>
      <dc:date>2010-09-02T17:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: PDF REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69296#M7964</link>
      <description>Hi:&lt;BR /&gt;
  A variation of my program would still work. I see you changed the original posted version of the report. The key thing would be the data transformation from the structure of your original dataset to the structure needed for PROC REPORT code similar to mine. Your alternative is to investigate DATA _NULL_ with PUT statements. The thing is that there's different DATA _NULL_ syntax for LISTING output versus the DATA _NULL_ syntax for ODS output, such as PDF, RTF or HTML.&lt;BR /&gt;
 &lt;BR /&gt;
We have some recorded e-lectures on the topic of DATA _NULL_ and the LISTING destination and DATA _NULL_ and ODS. You can find the electure bundle here. &lt;BR /&gt;
&lt;A href="https://support.sas.com/edu/schedules.html?id=986&amp;amp;ctry=US" target="_blank"&gt;https://support.sas.com/edu/schedules.html?id=986&amp;amp;ctry=US&lt;/A&gt; &lt;BR /&gt;
              &lt;BR /&gt;
There are also good examples of a "free-format" DATA _NULL_ report here (for the LISTING window):&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/25/429.html" target="_blank"&gt;http://support.sas.com/kb/25/429.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/24/608.html" target="_blank"&gt;http://support.sas.com/kb/24/608.html&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 02 Sep 2010 22:28:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69296#M7964</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-09-02T22:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: PDF REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69297#M7965</link>
      <description>Hi Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
As you mentioned that a variation of your program works for my sample data, I am trying to transform the data and couldn't get.&lt;BR /&gt;
&lt;BR /&gt;
Could you help me out in transforming my sample data so that i can use proc report to get the output.&lt;BR /&gt;
&lt;BR /&gt;
Thanks &amp;amp; Regards&lt;BR /&gt;
Jason</description>
      <pubDate>Wed, 08 Sep 2010 21:36:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69297#M7965</guid>
      <dc:creator>JasonNC</dc:creator>
      <dc:date>2010-09-08T21:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: PDF REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69298#M7966</link>
      <description>Hi:&lt;BR /&gt;
  You say (above) that this is a representation of your input file:&lt;BR /&gt;
&lt;B&gt;&lt;BR /&gt;
Name ID Kidsname Sex Age&lt;BR /&gt;
abc 100 x F 10&lt;BR /&gt;
abc 100 y M 15&lt;BR /&gt;
xyz 101 x F 11&lt;BR /&gt;
xyz 102 y M 15&lt;BR /&gt;
&lt;/B&gt;&lt;BR /&gt;
  &lt;BR /&gt;
Are there any changes you want to make??? For example, why for person abc, is the ID (100) the same on both records??? But for person xyz, the ID is different (101 and 102) on both records. Is there a person ID -and- a kids ID?????&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 09 Sep 2010 02:56:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69298#M7966</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-09-09T02:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: PDF REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69299#M7967</link>
      <description>Hi Cynthia,&lt;BR /&gt;
That was a mistake.&lt;BR /&gt;
&lt;BR /&gt;
Here is the Corrected input dataset layout.&lt;BR /&gt;
&lt;BR /&gt;
Name ID Kidsname Sex Age&lt;BR /&gt;
abc 100 x F 10&lt;BR /&gt;
abc 100 y M 15&lt;BR /&gt;
xyz 101 x F 11&lt;BR /&gt;
xyz 101 y M 15.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
and The Report&lt;BR /&gt;
should look like the following.&lt;BR /&gt;
all the titles i can get them.&lt;BR /&gt;
I have hard time to get the main report data layout. and I need to display like&lt;BR /&gt;
the following&lt;BR /&gt;
&lt;BR /&gt;
Name: abc&lt;BR /&gt;
Id : 100&lt;BR /&gt;
&lt;BR /&gt;
Kidsname  Sex  Age&lt;BR /&gt;
x                 F 10&lt;BR /&gt;
y                 M 15&lt;BR /&gt;
&lt;BR /&gt;
Name: xyz&lt;BR /&gt;
ID:  101&lt;BR /&gt;
&lt;BR /&gt;
Kidsname Sex  Age&lt;BR /&gt;
x              F     11&lt;BR /&gt;
y              M    15&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
thanks&lt;BR /&gt;
Jason</description>
      <pubDate>Thu, 09 Sep 2010 15:59:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69299#M7967</guid>
      <dc:creator>JasonNC</dc:creator>
      <dc:date>2010-09-09T15:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: PDF REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69300#M7968</link>
      <description>Hi, Jason:&lt;BR /&gt;
  Does every family have exactly 2 kids??? Could there be a family without any kids? 1 kid?? 20 kids?? What would those records look like?? Is there an upper limit on the number of kids a family could have??? Are there any rules about splitting a family across a page??? Should a family always stay together??? &lt;BR /&gt;
 &lt;BR /&gt;
  To me, this looks like a fairly standard DATA step program using FIRST. and LAST. processing (depending on the complexity of the "family") observations. Your program would need to create multiple observations per "family". So if you were going to use my program sample, you would need one observation for the "NAME" line, a second observation for the "ID" line and a third observation for the "break" line -- I think that this would all happen on the FIRST.ID or FIRST.NAME observation. Then you'd need a fourth observation for the "KIDSNAME" header line, etc, etc. But without more information about the data (how many kids -- at least 1, always 2, up to 20) -- there's no point in writing a program until those facts about the data are known.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 09 Sep 2010 16:44:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69300#M7968</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-09-09T16:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: PDF REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69301#M7969</link>
      <description>Hi Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
Well the kids can be any number and no limit.&lt;BR /&gt;
if a family can't fit on a page then it can go to a next page.&lt;BR /&gt;
&lt;BR /&gt;
Jason</description>
      <pubDate>Thu, 09 Sep 2010 17:33:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69301#M7969</guid>
      <dc:creator>JasonNC</dc:creator>
      <dc:date>2010-09-09T17:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: PDF REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69302#M7970</link>
      <description>Does ANY number mean 0 kids??? What would the record look like if there were 0 kids????&lt;BR /&gt;
[pre]&lt;BR /&gt;
abc 100 xenia F 10&lt;BR /&gt;
abc 100 yorick M 15&lt;BR /&gt;
xyz 101 anne F 11&lt;BR /&gt;
xyz 101 bill M 15&lt;BR /&gt;
def 102 ???  ? ??   &amp;lt;---no kids??&lt;BR /&gt;
ghi 103 mary F 12  &amp;lt;---1 kid&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Would there even BE any records with 0 kids???&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 09 Sep 2010 18:25:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69302#M7970</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-09-09T18:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: PDF REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69303#M7971</link>
      <description>Hi Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
THere won't be a case with zero kids.&lt;BR /&gt;
Each name will have non zero number kids.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Jason</description>
      <pubDate>Thu, 09 Sep 2010 19:12:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69303#M7971</guid>
      <dc:creator>JasonNC</dc:creator>
      <dc:date>2010-09-09T19:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: PDF REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69304#M7972</link>
      <description>Hi:&lt;BR /&gt;
  That's good. Have you done much DATA step programming or used FIRST. or LAST. processing???? Do you know how the OUTPUT statement works?&lt;BR /&gt;
 &lt;BR /&gt;
  For example, if you run the program below, you would get a dataset with 1 output observation for every input observation:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data one_in_one_out;&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  age_in_5 = age + 5;&lt;BR /&gt;
  ht_in_5 = height * 1.10;&lt;BR /&gt;
  output;&lt;BR /&gt;
run;&lt;BR /&gt;
                       &lt;BR /&gt;
proc print data=one_in_one_out;&lt;BR /&gt;
  title 'One Obs in, One Obs out -- show all 19 obs';&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                          &lt;BR /&gt;
But in order to transform the data so you can use it with PROC REPORT (which means making your own pgnum, ln_num, col1, col2, etc variables -- as shown in my program), then you would have to output more than one observation for some of the observations in your input file.&lt;BR /&gt;
 &lt;BR /&gt;
So consider how this program will work:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data one_in_more_out(keep=name obsno type col1 col2);&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  length type $10 col1 col2 $25;&lt;BR /&gt;
                          &lt;BR /&gt;
  obsno = _n_;&lt;BR /&gt;
              &lt;BR /&gt;
  type='hdr';&lt;BR /&gt;
  col1='Name:';&lt;BR /&gt;
  col2 = Name;&lt;BR /&gt;
  output;&lt;BR /&gt;
           &lt;BR /&gt;
  type='hdr';&lt;BR /&gt;
  col1 = 'Gender';&lt;BR /&gt;
  col2 = 'Height';&lt;BR /&gt;
  output;&lt;BR /&gt;
                 &lt;BR /&gt;
  type='data';&lt;BR /&gt;
  col1 = sex;&lt;BR /&gt;
  col2 = put(height,4.1);&lt;BR /&gt;
  output;&lt;BR /&gt;
               &lt;BR /&gt;
  type='brk';&lt;BR /&gt;
  col1 = ' ';&lt;BR /&gt;
  col2 = ' ';&lt;BR /&gt;
  output;&lt;BR /&gt;
run;&lt;BR /&gt;
                            &lt;BR /&gt;
proc print data=one_in_more_out;&lt;BR /&gt;
  where name in ('Alfred', 'Alice', 'Barbara');&lt;BR /&gt;
  title 'One Obs in, One Obs out -- show only for 3 names';&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
When the above program runs, it will read through SASHELP.CLASS and output more than 1 observation for every student. The following PROC PRINT output shows what is in the output dataset for 3 of the names:&lt;BR /&gt;
[pre]&lt;BR /&gt;
One Obs in, One Obs out -- show only for 3 names&lt;BR /&gt;
&lt;BR /&gt;
Obs     Name      type    col1      col2       obsno&lt;BR /&gt;
&lt;BR /&gt;
  1    Alfred     hdr     Name:     Alfred       1&lt;BR /&gt;
  2    Alfred     hdr     Gender    Height       1&lt;BR /&gt;
  3    Alfred     data    M         69.0         1&lt;BR /&gt;
  4    Alfred     brk                            1&lt;BR /&gt;
  5    Alice      hdr     Name:     Alice        2&lt;BR /&gt;
  6    Alice      hdr     Gender    Height       2&lt;BR /&gt;
  7    Alice      data    F         56.5         2&lt;BR /&gt;
  8    Alice      brk                            2&lt;BR /&gt;
  9    Barbara    hdr     Name:     Barbara      3&lt;BR /&gt;
 10    Barbara    hdr     Gender    Height       3&lt;BR /&gt;
 11    Barbara    data    F         65.3         3&lt;BR /&gt;
 12    Barbara    brk                            3&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                            &lt;BR /&gt;
So if you compare the output above to what I originally posted as a possible program, you should start to get some idea of how you can produce the report you want with PROC REPORT.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 09 Sep 2010 20:14:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-REPORT/m-p/69304#M7972</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-09-09T20:14:18Z</dc:date>
    </item>
  </channel>
</rss>

