<?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 ^{lastpage}  not playing nice with  ^preimage in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/lastpage-not-playing-nice-with-preimage/m-p/250132#M15253</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whenever I had a reference to&amp;nbsp;^{lastpage} , my &amp;nbsp;image added using ^preimage disappears, like in the minimal working &amp;nbsp;example (MWE) below. &amp;nbsp;Any idea how I could go to get both in the same report?&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
ods pdf file="c:\temp\report1.pdf" dpi=150 style=minimal ;
OPTIONS NODATE NONUMBER;
ods escapechar = '^'; 

Title1 j = l '^S={preimage="https://upload.wikimedia.org/wikipedia/en/thumb/9/96/Quebec_Nordiques_Logo.svg/200px-Quebec_Nordiques_Logo.svg.png" '
				j=r "Report";

footnote1 j=l "Generated today"
					j=r "total number of pages:  ^{lastpage} - graph is not shown";


*footnote1 j=l "Generated today"
					j=r "current page number ^{thispage}  -graph is shown ";


proc sort data= sashelp.class out=temp;; by sex height weight;
run;

data temp;
set temp;
by sex;
if first.sex then sex2= sex;
else sex2="";
obs=_n_;
weight_cat= floor(weight/10)*10;
_empty=' ';
run;

proc report data=temp ls=120 ps=40 nowd 
	split="*"
	style(report)=
		[ frame = void /* outside borders: void, box, above/below, vsides/hsides, lhs/rhs */
 			rules = groups /* internal borders: none, all, cols, rows, groups */]
	style(header)=
		[just=r]
	style(column)=
		[just=r];

column 
	obs
	sex2
	name
	_empty
	("^S={just=c borderbottomwidth=2 borderbottomcolor=&amp;amp;lightgrey.} Metrics^{super 1}" height weight )
	row_color
;
define obs /display noprint;
define sex2/display  "Sex" style(header)=[just=l borderbottomwidth=2 borderbottomcolor=&amp;amp;lightgrey.] style(column)=[just=l];
define name /display "Name" style(header)=[just=l  borderbottomwidth=2 borderbottomcolor=&amp;amp;lightgrey.] style(column)=[just=l];
define _empty/' ' style(column)={cellwidth=1%}  style(header)=[just=c vjust=top borderbottomcolor=lightgrey]; 
define height/display  "Height" format =5.1 style(header)=[just=r borderbottomwidth=2 borderbottomcolor=&amp;amp;lightgrey.] style(column)=[just=r];
define weight /display "Weight^{super 2}" format =5.0 style(header)=[just=r borderbottomwidth=2 borderbottomcolor=&amp;amp;lightgrey.] style(column)=[just=r ] format=16.;
define row_color  /computed noprint;
  
compute row_color;
		if mod(obs,2)=1 then call define (_row_,"style","style=[background=&amp;amp;verylightgrey.]");
		if weight&amp;lt;=100 then call define ("weight","style","style=[font_weight=bold  background=GREEN ");
		if weight&amp;gt;=100 then call define ("weight","style","style=[font_weight=bold  background=red ");
endcomp;

run;
quit;
ods pdf close;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Feb 2016 17:49:39 GMT</pubDate>
    <dc:creator>morglum</dc:creator>
    <dc:date>2016-02-15T17:49:39Z</dc:date>
    <item>
      <title>^{lastpage}  not playing nice with  ^preimage</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/lastpage-not-playing-nice-with-preimage/m-p/250132#M15253</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whenever I had a reference to&amp;nbsp;^{lastpage} , my &amp;nbsp;image added using ^preimage disappears, like in the minimal working &amp;nbsp;example (MWE) below. &amp;nbsp;Any idea how I could go to get both in the same report?&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
ods pdf file="c:\temp\report1.pdf" dpi=150 style=minimal ;
OPTIONS NODATE NONUMBER;
ods escapechar = '^'; 

Title1 j = l '^S={preimage="https://upload.wikimedia.org/wikipedia/en/thumb/9/96/Quebec_Nordiques_Logo.svg/200px-Quebec_Nordiques_Logo.svg.png" '
				j=r "Report";

footnote1 j=l "Generated today"
					j=r "total number of pages:  ^{lastpage} - graph is not shown";


*footnote1 j=l "Generated today"
					j=r "current page number ^{thispage}  -graph is shown ";


proc sort data= sashelp.class out=temp;; by sex height weight;
run;

data temp;
set temp;
by sex;
if first.sex then sex2= sex;
else sex2="";
obs=_n_;
weight_cat= floor(weight/10)*10;
_empty=' ';
run;

proc report data=temp ls=120 ps=40 nowd 
	split="*"
	style(report)=
		[ frame = void /* outside borders: void, box, above/below, vsides/hsides, lhs/rhs */
 			rules = groups /* internal borders: none, all, cols, rows, groups */]
	style(header)=
		[just=r]
	style(column)=
		[just=r];

column 
	obs
	sex2
	name
	_empty
	("^S={just=c borderbottomwidth=2 borderbottomcolor=&amp;amp;lightgrey.} Metrics^{super 1}" height weight )
	row_color
;
define obs /display noprint;
define sex2/display  "Sex" style(header)=[just=l borderbottomwidth=2 borderbottomcolor=&amp;amp;lightgrey.] style(column)=[just=l];
define name /display "Name" style(header)=[just=l  borderbottomwidth=2 borderbottomcolor=&amp;amp;lightgrey.] style(column)=[just=l];
define _empty/' ' style(column)={cellwidth=1%}  style(header)=[just=c vjust=top borderbottomcolor=lightgrey]; 
define height/display  "Height" format =5.1 style(header)=[just=r borderbottomwidth=2 borderbottomcolor=&amp;amp;lightgrey.] style(column)=[just=r];
define weight /display "Weight^{super 2}" format =5.0 style(header)=[just=r borderbottomwidth=2 borderbottomcolor=&amp;amp;lightgrey.] style(column)=[just=r ] format=16.;
define row_color  /computed noprint;
  
compute row_color;
		if mod(obs,2)=1 then call define (_row_,"style","style=[background=&amp;amp;verylightgrey.]");
		if weight&amp;lt;=100 then call define ("weight","style","style=[font_weight=bold  background=GREEN ");
		if weight&amp;gt;=100 then call define ("weight","style","style=[font_weight=bold  background=red ");
endcomp;

run;
quit;
ods pdf close;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2016 17:49:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/lastpage-not-playing-nice-with-preimage/m-p/250132#M15253</guid>
      <dc:creator>morglum</dc:creator>
      <dc:date>2016-02-15T17:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: ^{lastpage}  not playing nice with  ^preimage</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/lastpage-not-playing-nice-with-preimage/m-p/250149#M15254</link>
      <description>Hi, There is (I remember) a Tech Support note about using {LASTPAGE} with ODS PDF and images. My memory is that it doesn't work (something about having an image and the ESCAPECHAR control were incompatible). I will try to find the link. &lt;BR /&gt;cynthia</description>
      <pubDate>Mon, 15 Feb 2016 19:28:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/lastpage-not-playing-nice-with-preimage/m-p/250149#M15254</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-02-15T19:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: ^{lastpage}  not playing nice with  ^preimage</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/lastpage-not-playing-nice-with-preimage/m-p/250150#M15255</link>
      <description>&lt;A href="http://support.sas.com/kb/34/573.html" target="_blank"&gt;http://support.sas.com/kb/34/573.html&lt;/A&gt;</description>
      <pubDate>Mon, 15 Feb 2016 19:29:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/lastpage-not-playing-nice-with-preimage/m-p/250150#M15255</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-02-15T19:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: ^{lastpage}  not playing nice with  ^preimage</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/lastpage-not-playing-nice-with-preimage/m-p/250157#M15257</link>
      <description>&lt;P&gt;So there is a work around, thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2016 19:44:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/lastpage-not-playing-nice-with-preimage/m-p/250157#M15257</guid>
      <dc:creator>morglum</dc:creator>
      <dc:date>2016-02-15T19:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: ^{lastpage}  not playing nice with  ^preimage</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/lastpage-not-playing-nice-with-preimage/m-p/250175#M15258</link>
      <description>&lt;P&gt;that being said, it would be nice if SAS could at least pop a warning...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2016 20:14:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/lastpage-not-playing-nice-with-preimage/m-p/250175#M15258</guid>
      <dc:creator>morglum</dc:creator>
      <dc:date>2016-02-15T20:14:24Z</dc:date>
    </item>
  </channel>
</rss>

