<?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: Is it possible to determine the page count with ODS document? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Is-it-possible-to-determine-the-page-count-with-ODS-document/m-p/296748#M16803</link>
    <description>Sorry. ODS can't determine the page count like this.</description>
    <pubDate>Tue, 06 Sep 2016 14:17:58 GMT</pubDate>
    <dc:creator>Tim_SAS</dc:creator>
    <dc:date>2016-09-06T14:17:58Z</dc:date>
    <item>
      <title>Is it possible to determine the page count with ODS document?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Is-it-possible-to-determine-the-page-count-with-ODS-document/m-p/296735#M16802</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can ODS document or any other SAS method determine the page count that a document will have after its generation (before actually creating the document)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to generate a RTF document that cannot have more than 1000 pages. If the data will lead to more than 1000 pages I want a preemtive warning as currently I need to open the document and check every time the data updates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have all the related information at hand in a template or options (margins, cellpadding, page size etc.) and the code looks something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Information that influences document:&lt;/P&gt;
&lt;PRE&gt;OPTIONS FONT='courier new' normal 9 NODATE NONUMBER ORIENTATION=landscape;
OPTIONS PAPERSIZE=A4 TOPMARGIN = 1in BOTTOMMARGIN = 1in LEFTMARGIN = 1in RIGHTMARGIN = 1in;

PROC TEMPLATE;
  DEFINE STYLE styles.mystyle;
  PARENT=styles.printer;
  style parskip / fontsize = 5pt;
  REPLACE FONTS /
    'TitleFont'           = ('courier new', 9pt)
    'TitleFont2'          = ('courier new', 9pt)
    'StrongFont'          = ('courier new', 9pt)
    'EmphasisFont'        = ('courier new', 9pt)
    'HeadingEmphasisFont' = ('courier new', 9pt)
    'HeadingFont'         = ('courier new', 9pt)
    'DocFont'             = ('courier new', 9pt)
    'FootFont'            = ('courier new', 9pt)
    'FixedEmphasisFont'   = ('courier new', 9pt)
    'FixedStrongFont'     = ('courier new', 9pt)
    'FixedHeadingFont'    = ('courier new', 9pt)
    'BatchFixedFont'      = ('courier new', 9pt)
    'FixedFont'           = ('courier new', 9pt);
  REPLACE TABLE FROM OUTPUT /
    frame = box
    rules = all
    cellpadding = 1pt
    cellspacing = 0;
  CLASS SYSTEMTITLE /
    protectspecialchars=OFF
    asis=ON;
  CLASS SYSTEMFOOTER /
    font=Fonts('footFont')
    protectspecialchars=OFF
    asis=ON;
  CLASS HEADER /
    protectspecialchars=off;
  CLASS DATA /
    protectspecialchars=off;
  CLASS ROWHEADER /
    protectspecialchars=off;
  CLASS USERTEXT /
    protectspecialchars=off;
  CLASS BYLINE /
    protectspecialchars=off;
  STYLE graphfonts from graphfonts /
    'GraphDataFont'     = ('courier new', 9pt)
    'GraphUnicodeFont'  = ('courier new', 9pt)
    'GraphValueFont'    = ('courier new', 9pt)
    'GraphLabel2Font'   = ('courier new', 9pt)
    'GraphLabelFont'    = ('courier new', 9pt)
    'GraphFootnoteFont' = ('courier new', 9pt)
    'GraphTitleFont'    = ('courier new', 9pt)
    'GraphTitle1Font'   = ('courier new', 9pt)
    'GraphAnnoFont'     = ('courier new', 9pt);
  END;
RUN;&lt;/PRE&gt;
&lt;P&gt;The document generation code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ODS RTF FILE = "C:\mydoc.rtf" STYLE=styles.mystyle HEADERY=1 FOOTERY=800 NOTOC_DATA NOCONTENTS;
  ;
  ;
ODS escapechar='^';
ODS RESULTS OFF;
ODS RTF TEXT = "Some Information";


...proc report code here...


ODS RTF CLOSE;
RUN;&lt;/PRE&gt;
&lt;P&gt;What I am wondering is if I exchange the ODS RTF with ODS DOCUMENT can the pages that will be used be determined?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Playing around with ODS DOCUMENT AND PROC DOCUMENT I could not find any such information yet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your help,&lt;BR /&gt;Tiaan&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2016 13:53:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Is-it-possible-to-determine-the-page-count-with-ODS-document/m-p/296735#M16802</guid>
      <dc:creator>Tiaan</dc:creator>
      <dc:date>2016-09-06T13:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to determine the page count with ODS document?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Is-it-possible-to-determine-the-page-count-with-ODS-document/m-p/296748#M16803</link>
      <description>Sorry. ODS can't determine the page count like this.</description>
      <pubDate>Tue, 06 Sep 2016 14:17:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Is-it-possible-to-determine-the-page-count-with-ODS-document/m-p/296748#M16803</guid>
      <dc:creator>Tim_SAS</dc:creator>
      <dc:date>2016-09-06T14:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to determine the page count with ODS document?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Is-it-possible-to-determine-the-page-count-with-ODS-document/m-p/296756#M16805</link>
      <description>&lt;P&gt;Hi Tim,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ok, thank you for the confirmation anyway.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2016 14:45:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Is-it-possible-to-determine-the-page-count-with-ODS-document/m-p/296756#M16805</guid>
      <dc:creator>Tiaan</dc:creator>
      <dc:date>2016-09-06T14:45:40Z</dc:date>
    </item>
  </channel>
</rss>

