<?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 in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Generate-report-in-two-pages/m-p/66568#M7725</link>
    <description>Thanks!!!!!!!!! Its running</description>
    <pubDate>Fri, 28 Jan 2011 09:34:24 GMT</pubDate>
    <dc:creator>dash</dc:creator>
    <dc:date>2011-01-28T09:34:24Z</dc:date>
    <item>
      <title>Generate report in two pages</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Generate-report-in-two-pages/m-p/66565#M7722</link>
      <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
How can I report the below data state wise (AP KA TN) in two pages in stead of three; AP and KA data should be in one page and TN data in another page.&lt;BR /&gt;
plz check. I have written the program like that.(displaying in three separate pages)&lt;BR /&gt;
data prod_sales;&lt;BR /&gt;
input state $ pcode $ area $ month stock sale;&lt;BR /&gt;
cards;&lt;BR /&gt;
AP N79 HYD 1 40 20&lt;BR /&gt;
TN N79 CHN 1 30 10&lt;BR /&gt;
KA N79 BAN 1 45 20&lt;BR /&gt;
AP N79 HYD 2 30 15&lt;BR /&gt;
TN N79 CHN 2 10 10&lt;BR /&gt;
KA N79 BAN 2 45 30&lt;BR /&gt;
TN N79 CHN 3 20 10&lt;BR /&gt;
KA N79 BAN 3 25 20&lt;BR /&gt;
AP N79 HYD 3 20 15&lt;BR /&gt;
;&lt;BR /&gt;
proc report data=prod_sales nowd headline;&lt;BR /&gt;
define state/order;&lt;BR /&gt;
define area/order;&lt;BR /&gt;
define pcode/order;&lt;BR /&gt;
break after state/page;&lt;BR /&gt;
compute after state;&lt;BR /&gt;
line 65*'-';&lt;BR /&gt;
line 'End of the report';&lt;BR /&gt;
endcomp;&lt;BR /&gt;
compute before _page_;&lt;BR /&gt;
line 'This report belongs to: ' state $6.;&lt;BR /&gt;
endcomp;&lt;BR /&gt;
run; &lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance</description>
      <pubDate>Fri, 28 Jan 2011 03:22:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Generate-report-in-two-pages/m-p/66565#M7722</guid>
      <dc:creator>dash</dc:creator>
      <dc:date>2011-01-28T03:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Generate report in two pages</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Generate-report-in-two-pages/m-p/66566#M7723</link>
      <description>Hi.&lt;BR /&gt;
Because of ' break after state/page;' ,You have three value so have three pages.&lt;BR /&gt;
Want two page is easy to make a break variable.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data prod_sales;&lt;BR /&gt;
input state $ pcode $ area $ month stock sale;&lt;BR /&gt;
if state='TN' then page=1;&lt;BR /&gt;
 else page=0;&lt;BR /&gt;
cards;&lt;BR /&gt;
AP N79 HYD 1 40 20&lt;BR /&gt;
TN N79 CHN 1 30 10&lt;BR /&gt;
KA N79 BAN 1 45 20&lt;BR /&gt;
AP N79 HYD 2 30 15&lt;BR /&gt;
TN N79 CHN 2 10 10&lt;BR /&gt;
KA N79 BAN 2 45 30&lt;BR /&gt;
TN N79 CHN 3 20 10&lt;BR /&gt;
KA N79 BAN 3 25 20&lt;BR /&gt;
AP N79 HYD 3 20 15&lt;BR /&gt;
;&lt;BR /&gt;
ods pdf file='c:\test.pdf' style=sasweb;&lt;BR /&gt;
proc report data=prod_sales nowd headline;&lt;BR /&gt;
column page state area pcode;&lt;BR /&gt;
define page /group noprint;&lt;BR /&gt;
define state/order;&lt;BR /&gt;
define area/order;&lt;BR /&gt;
define pcode/order;&lt;BR /&gt;
break after page/page;&lt;BR /&gt;
compute after state;&lt;BR /&gt;
line 65*'-';&lt;BR /&gt;
line 'End of the report';&lt;BR /&gt;
endcomp;&lt;BR /&gt;
compute before _page_;&lt;BR /&gt;
line 'This report belongs to: ' state $6.;&lt;BR /&gt;
endcomp;&lt;BR /&gt;
run; &lt;BR /&gt;
ods pdf close;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
[/pre]</description>
      <pubDate>Fri, 28 Jan 2011 05:27:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Generate-report-in-two-pages/m-p/66566#M7723</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-01-28T05:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Generate report in two pages</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Generate-report-in-two-pages/m-p/66567#M7724</link>
      <description>hello,&lt;BR /&gt;
&lt;BR /&gt;
I will add to KSharp's solution the use of proc format so the title changes a little bit:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data prod_sales;&lt;BR /&gt;
input state $ pcode $ area $ month stock sale;&lt;BR /&gt;
&lt;BR /&gt;
s=ifn(state in ('AP','KA'),1,2);&lt;BR /&gt;
&lt;BR /&gt;
cards;&lt;BR /&gt;
AP N79 HYD 1 40 20&lt;BR /&gt;
TN N79 CHN 1 30 10&lt;BR /&gt;
KA N79 BAN 1 45 20&lt;BR /&gt;
AP N79 HYD 2 30 15&lt;BR /&gt;
TN N79 CHN 2 10 10&lt;BR /&gt;
KA N79 BAN 2 45 30&lt;BR /&gt;
TN N79 CHN 3 20 10&lt;BR /&gt;
KA N79 BAN 3 25 20&lt;BR /&gt;
AP N79 HYD 3 20 15&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
proc format;&lt;BR /&gt;
	value s&lt;BR /&gt;
		1='AP,KA'&lt;BR /&gt;
		2='TN';&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc report data=prod_sales nowd headline;&lt;BR /&gt;
&lt;BR /&gt;
column s state  pcode  area  month stock sale;&lt;BR /&gt;
&lt;BR /&gt;
define state/order;&lt;BR /&gt;
define area/order;&lt;BR /&gt;
define pcode/order;&lt;BR /&gt;
define s/group noprint;&lt;BR /&gt;
&lt;BR /&gt;
break after state/summarize;&lt;BR /&gt;
&lt;BR /&gt;
break after s/page;&lt;BR /&gt;
&lt;BR /&gt;
compute after s;&lt;BR /&gt;
        line 65*'-';&lt;BR /&gt;
        line 'End of the report';&lt;BR /&gt;
endcomp;&lt;BR /&gt;
&lt;BR /&gt;
compute before _page_;&lt;BR /&gt;
        line 'This report belongs to: ' s s.;&lt;BR /&gt;
endcomp;&lt;BR /&gt;
&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Marius</description>
      <pubDate>Fri, 28 Jan 2011 09:09:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Generate-report-in-two-pages/m-p/66567#M7724</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-01-28T09:09:24Z</dc:date>
    </item>
    <item>
      <title>Re</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Generate-report-in-two-pages/m-p/66568#M7725</link>
      <description>Thanks!!!!!!!!! Its running</description>
      <pubDate>Fri, 28 Jan 2011 09:34:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Generate-report-in-two-pages/m-p/66568#M7725</guid>
      <dc:creator>dash</dc:creator>
      <dc:date>2011-01-28T09:34:24Z</dc:date>
    </item>
  </channel>
</rss>

