<?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: compute after page. line ' ' to change dynamically in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/676551#M24345</link>
    <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; In your proc report statement you could try:&lt;/P&gt;
&lt;P&gt;proc report data=...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(report)={rules=none frame=void cellspacing=0};&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but that might not work depending on your destination. The border looks like the border of the entire table. Unfortunately when you add a LINE statement to PROC REPORT, the empty line is inserted inside the boundary of the table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you using Enterprise Guide? If so, what version of EG are you using?&amp;nbsp; Is the ultimate destination HTML, RTF or PDF for your output. You might try ODS LAYOUT with ODS PDF or ODS HTML to see if you can get better results without using LINE statements for spacing and placement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
    <pubDate>Thu, 13 Aug 2020 16:58:11 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2020-08-13T16:58:11Z</dc:date>
    <item>
      <title>compute after page. line ' ' to change dynamically</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/676501#M24344</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using the compute after _page_&amp;nbsp; function (found &lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Add-Space-After-By-Group-ODS-PDF/td-p/519295" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;)&amp;nbsp;to add blank spaces between tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This works brilliantly but I was wondering if I can get the code to add the number of lines&amp;nbsp;based on the &amp;nbsp;number of lines of each report (rather than giving a set number of lines).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hopefully the picture below&amp;nbsp;will explain it better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to align the "Reports" to each "Charts", but the height of each Reports can vary, while the height of the charts is always the same.&lt;/P&gt;
&lt;P&gt;(this is only dummy data; in the real datasets the&amp;nbsp;variance is more evident).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled picture.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48202i8EC62F102884115E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled picture.png" alt="Untitled picture.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the code&lt;/P&gt;
&lt;PRE&gt;data CHART_TABLE;
	input Date	App$ Conn $ Records CV	Mean Median;
	datalines;

202002 APP_A CONN1 35 0.9 46 40
202003 APP_A CONN1 26 0.9 8 5
202004 APP_A CONN1 41 0.3 39 46
202002 APP_A CONN2 12 0.9 3 16 
202003 APP_A CONN2 40 0.7 16 5
202004 APP_A CONN2 49 0.9 28 4
202002 APP_B CONN1 21 0.3 0 5
202003 APP_B CONN1 25 0.1 47 28
202004 APP_B CONN1 19 0.6 33 1
202002 APP_B CONN2 47 01.60 4 9
202003 APP_B CONN2 16 0.12 20 28
202004 APP_B CONN2 35 0.5 0 6
202002 APP_B CONN2 42 0.3 12 22
202003 APP_B CONN2 8 0.1 37 41
202004 APP_B CONN2 9 0.7 42 3
202002 APP_B CONN4 30 0.5 1 22
202003 APP_B CONN4 15 0.2 45 26
202004 APP_B CONN4 45 0.8 17 47
202002 APP_C CONN3 55 0.9 46 45
202003 APP_C CONN3 24 0.9 9 5
202004 APP_C CONN3 40 0.4 31 42
202002 APP_C CONN5 33 0.5 51 20
202003 APP_C CONN5 20 0.8 7 8
202004 APP_C CONN5 40 0.5 31 86
run;

PROC SORT data=CHART_TABLE
	out=CHAR_TABLE_SORT;
	by  App Conn Date;




TITLE1 "Reports";

proc report data=WORK.CHAR_TABLE_SORT nowd;
by App;
	column  DATE  App Conn CV Mean Median Records;
	define DATE / group ;
	define App / group ;
	define Conn / group ;
	define CV / group;
	define Mean / group;
	define Median / group;
	define Records / sum;

  compute after _page_ / style={ BORDERCOLOR=white BORDERLEFTCOLOR=white};
    line ' ';
    line ' ';
    line ' ';
	line ' ';
    line ' ';
    line ' ';
    line ' ';
    line ' ';
    line ' ';
    line ' ';
    line ' ';
    line ' ';    
    line ' ';
    line ' ';
    line ' ';
    line ' ';
    line ' ';
    line ' ';
    line ' ';
    line ' ';

  endcomp;

run;

quit;


&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also I cannot get rid of the right border!! despite having tried (I think) every possible option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 14:37:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/676501#M24344</guid>
      <dc:creator>MART1</dc:creator>
      <dc:date>2020-08-13T14:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: compute after page. line ' ' to change dynamically</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/676551#M24345</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; In your proc report statement you could try:&lt;/P&gt;
&lt;P&gt;proc report data=...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(report)={rules=none frame=void cellspacing=0};&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but that might not work depending on your destination. The border looks like the border of the entire table. Unfortunately when you add a LINE statement to PROC REPORT, the empty line is inserted inside the boundary of the table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you using Enterprise Guide? If so, what version of EG are you using?&amp;nbsp; Is the ultimate destination HTML, RTF or PDF for your output. You might try ODS LAYOUT with ODS PDF or ODS HTML to see if you can get better results without using LINE statements for spacing and placement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 16:58:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/676551#M24345</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-08-13T16:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: compute after page. line ' ' to change dynamically</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/676665#M24346</link>
      <description>&lt;P&gt;thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;for your reply&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;just tried&lt;/P&gt;
&lt;P&gt;style(report)={rules=none frame=void cellspacing=0&lt;/P&gt;
&lt;P&gt;but it does not change the placement of the tables;&amp;nbsp;I'll keep playing around (maybe as you mentioned my version is too old?).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using EG 7.13, and&amp;nbsp;the ultimate destination is HTML.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I never used ODS HTML before but I see how it might fix quite a few of my problems!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 09:26:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/676665#M24346</guid>
      <dc:creator>MART1</dc:creator>
      <dc:date>2020-08-14T09:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: compute after page. line ' ' to change dynamically</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/676755#M24347</link>
      <description>Hi:&lt;BR /&gt;  It just occurred to me that you might be generating reports from multiple outputs using the Report Layout tool in Enterprise Guide. If that is the case, then you will not see any border style changes reflected there. EG's report layout tool is manipulating the objects after they have been created, I'm not sure you can add anything to the style specification that will impact EG.&lt;BR /&gt;Cynthia</description>
      <pubDate>Fri, 14 Aug 2020 14:57:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/676755#M24347</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-08-14T14:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: compute after page. line ' ' to change dynamically</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/678410#M24364</link>
      <description>Thanks Cynthia.&lt;BR /&gt;&lt;BR /&gt;Yes I'm using the Report Layout tool combining different outputs. Had a try using ODS HTHM but had no luck.&lt;BR /&gt;&lt;BR /&gt;Unfortunately I think I'll have to use Excel as a "middle man" for this.&lt;BR /&gt;&lt;BR /&gt;thanks for your help anyway</description>
      <pubDate>Fri, 21 Aug 2020 10:56:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/678410#M24364</guid>
      <dc:creator>MART1</dc:creator>
      <dc:date>2020-08-21T10:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: compute after page. line ' ' to change dynamically</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/678449#M24365</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;You have to use ODS HTML with ODS LAYOUT. ODS HTML won't do side by side output. Take a look at the example on page 24 of this paper: &lt;A href="https://support.sas.com/resources/papers/proceedings16/SAS5762-2016.pdf" target="_blank" rel="noopener"&gt;https://support.sas.com/resources/papers/proceedings16/SAS5762-2016.pdf&lt;/A&gt; -- it's not exactly what you want because I have put the graphs side by side instead of a graph and a table. But some modification of the procedures being used should allow you to do a graph on the left and a table on the right. Here's an example using SASHELP.CLASS.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1598019926746.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48526iCD8FB39BE79F2309/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1598019926746.png" alt="Cynthia_sas_0-1598019926746.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
ods html(id=1) path='c:\temp' (url=none)
        gpath='c:\temp' (url=none)
        file="show_layout.html" ;

title font=Helvetica bold h=14pt 'Using PROC REPORT and ODS LAYOUT';

ods layout gridded rows=2 columns=2 column_widths=(3.75in 3.75in);

ods region;
ods graphics / height=3in width=3.5in;
proc sgplot data=sashelp.class noautolegend;
title 'Preteens';
  where age le 13;
  vbar sex / response=height stat=mean datalabel group=sex ;
run;
title;


ods region;
ods graphics / height=3in width=3.5in;
proc report data=sashelp.class;
  where age le 13;
  column age sex height,(min mean median max);
  define age / group;
  define sex / group;
  define min / f=7.2;
  define mean / f=7.2;
  define median / f=7.2;
  define max / f=7.2;
  rbreak after / summarize;
run;


ods region;
ods graphics / height=3in width=3.5in;
proc sgplot data=sashelp.class noautolegend;
title 'Teens';
  where age gt 13;
  vbar sex / response=height stat=mean datalabel group=sex ;
run;
title;

ods region;
ods graphics / height=3in width=3.5in;
proc report data=sashelp.class;
  where age gt 13;
  column age sex height,(min mean median max);
  define age / group;
  define sex / group;
  define min / f=7.2;
  define mean / f=7.2;
  define median / f=7.2;
  define max / f=7.2;
  rbreak after / summarize;
run;

ods layout end;

ods html(id=1) close;
 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 14:46:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/678449#M24365</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-08-21T14:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: compute after page. line ' ' to change dynamically</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/680967#M24391</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;. That would work brilliantly if I had individual charts and reports, however I'm splitting both by using BY.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using ODS LAYOUT, this is what get (using&amp;nbsp; &amp;nbsp;line ' ')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Untitled pictureODS.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48871i5121CA1864920450/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled pictureODS.png" alt="Untitled pictureODS.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the screenshot only shows the&amp;nbsp;top of the&amp;nbsp;output, but as you scroll further down the misalignment between chart and table is more apparent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the code I'm using; amending the &lt;STRONG&gt;height &lt;/STRONG&gt;of the ODS LAYOUT does not&amp;nbsp;improve it&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data CHART_TABLE;
	input Date	App$ Conn $ Records CV	Mean Median;
	datalines;

202002 APP_A CONN1 35 0.9 46 40
202003 APP_A CONN1 26 0.9 8 5
202004 APP_A CONN1 41 0.3 39 46
202002 APP_A CONN2 12 0.9 3 16 
202003 APP_A CONN2 40 0.7 16 5
202004 APP_A CONN2 49 0.9 28 4
202002 APP_B CONN1 21 0.3 0 5
202003 APP_B CONN1 25 0.1 47 28
202004 APP_B CONN1 19 0.6 33 1
202002 APP_B CONN2 47 01.60 4 9
202003 APP_B CONN2 16 0.12 20 28
202004 APP_B CONN2 35 0.5 0 6
202002 APP_B CONN2 42 0.3 12 22
202003 APP_B CONN2 8 0.1 37 41
202004 APP_B CONN2 9 0.7 42 3
202002 APP_B CONN4 30 0.5 1 22
202003 APP_B CONN4 15 0.2 45 26
202004 APP_B CONN4 45 0.8 17 47
202002 APP_C CONN3 55 0.9 46 45
202003 APP_C CONN3 24 0.9 9 5
202004 APP_C CONN3 40 0.4 31 42
202002 APP_C CONN5 33 0.5 51 20
202003 APP_C CONN5 20 0.8 7 8
202004 APP_C CONN5 40 0.5 31 86
run;

PROC SORT data=CHART_TABLE
	out=CHAR_TABLE_SORT;
	by  App Conn Date;


ods layout gridded columns=2 Heights=8cm;
   
ods region;
options byline;/*this option removed the automatic titles that are added */


proc sgplot data=CHAR_TABLE_SORT;
	xaxis type=discrete display=(nolabel) fitpolicy=thin;
	yaxis grid;
	series x=Date y=Records / group=Conn;
	by App conn;
run;

ods region;
options nobyline;/*this option removes the automatic titles that are added */

proc report data=WORK.CHAR_TABLE_SORT nowd;
by App Conn;
	column  DATE  App Conn CV Mean Median Records;
	define DATE / group ;
	define App / group ;
	define Conn / group ;
	define CV / group;
	define Mean / group;
	define Median / group;
	define Records / sum;

  compute after _page_ / style={ BORDERCOLOR=white BORDERLEFTCOLOR=white};
    line ' ';
    line ' ';
    line ' ';
	line ' ';
    line ' ';
    line ' ';
    line ' ';
    line ' ';
    line ' ';
    line ' ';
    line ' ';
    line ' ';    
    line ' ';
    line ' ';
    line ' ';
    line ' ';
    line ' ';
    line ' ';
    line ' ';
    line ' ';

  endcomp;

run;

quit;

ods layout end;
&lt;/PRE&gt;
&lt;P&gt;(ps: I can't use ODS HTML as SAS and the folder structure I am in are in different environment, but that's not an issue as I can manually export the&amp;nbsp;output to html).&lt;/P&gt;
&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&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;</description>
      <pubDate>Wed, 02 Sep 2020 13:02:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/680967#M24391</guid>
      <dc:creator>MART1</dc:creator>
      <dc:date>2020-09-02T13:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: compute after page. line ' ' to change dynamically</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/681193#M24393</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If you take a step away from BY group processing and move to WHERE processing with a bit of SAS Macro code, then these results are possible without any LINE statement for positioning (sorry for the partial results, I was trying to fit as many on the browser screen as possible):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1599093057002.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48931i65BAD247CA99D71B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1599093057002.png" alt="Cynthia_sas_0-1599093057002.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;next groups:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1599093123575.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48932i4400748892E94415/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1599093123575.png" alt="Cynthia_sas_1-1599093123575.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I used your code and treated each APP/CONN unique combo as one "report" and then used a macro program to invoke that report over and over for multiple pairs. Here's the code I used to find the unique combinations of APP and CONN:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
ods output list=work.owlist(drop=table f_app f_conn);
proc freq data=char_table_sort;
  tables app*conn/nocum nopercent list;
run;

proc print data=work.owlist noobs;
title 'To make the program more dynamic,';
title2 'could automate running the macro code from this file';
run;
title;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and that resulted in WORK.OWLIST, which looked like THIS:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_2-1599093436853.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48933i17A2BB3A1D07551D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_2-1599093436853.png" alt="Cynthia_sas_2-1599093436853.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's what the macro program definition looked like (color coded to show the use of the macro variables &amp;amp;WANTAPP and &amp;amp;WANTCONN:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_3-1599093701282.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48934iD12118FD537B0517/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_3-1599093701282.png" alt="Cynthia_sas_3-1599093701282.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Note that there are NOT any LINE statements needed in the PROC REPORT code for spacing purposes. Note also that the ODS HTML statements are not inside the macro program. And here's the ODS "sandwich" where the macro program was invoked for each unique APP/CONN combination:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_4-1599093913992.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48935i4D05206DEBB7D909/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_4-1599093913992.png" alt="Cynthia_sas_4-1599093913992.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Since there were a limited number of combinations, I just made manual calls to the macro program after I defined it. Although this is not as simple as using BY group processing, if the alignment from the BY group processing is not working for you, then this approach would eliminate the need for the LINE statements entirely.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Note that the ODS LAYOUT statements and the SGPLOT and PROC REPORT have been changed to only have WHERE instead of BY. Then the macro invocation is inside the ODS HTML "sandwich". When you use EG or SAS Studio, or even Display Manager, you are still using ODS HTML behind the scenes, the only difference is that ODS HTML statements allow you to explicitly name the file that you're creating.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; The Macro program could be changed to be dynamic, using CALL EXECUTE or other techniques like %INCLUDE. This would mean no manual coding of APP/CONN combinations at all, but that is probably an example for a different post, assuming that you would be willing to switch to a different method in order to lose the LINE statements and get the alignment you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 00:59:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/681193#M24393</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-09-03T00:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: compute after page. line ' ' to change dynamically</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/681429#M24406</link>
      <description>&lt;P&gt;Thank you so much &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my "real" data the App Conn combination changes every day, so I'll definitely have to do it dynamically.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've looked everywhere (I think!) but I can't find an example on how to use CALL EXECUTE on PROC SGPLOT or PROC REPORT - all papers talk about using it using it in a data step. Do you know where I could get any idea? (never used macros so everything is pretty new here).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, I have run your example, but it's putting everything in one column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only thing I changed is the ODS "sandwich", where I used&amp;nbsp;LAYOUT instead of&amp;nbsp;HTML (this is because the server where SAS lives and the folder structure I am in are in different environment, so I export to html using the Export function).&lt;/P&gt;
&lt;P&gt;I don's see why but could this be the reason?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code I copied for you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%macro makereport(wantapp=,wantconn=);

ods layout gridded columns=2 Height=8cm;

ods region;

title "TEST";

proc sgplot data=CHAR_TABLE_SORT;

xaxis type=discrete display=(nolabel) fitpolicy=thin;
yaxis grid;

series x=Date y=Records / group=Conn;
where app="&amp;amp;wantapp" and conn="&amp;amp;wantconn";

run;


title;
ods region;

proc report data=WORK.char_table_sort nowd;
where app ="&amp;amp;wantapp" and conn="&amp;amp;wantconn";
column DATE App Conn cv Mean Median Records ;
define DATE / group;
define App / group;
define Conn / group;
define CV / group;
define Mean / group;
define Median / group;
define Records / sum;

run;
ods layout end;
%mend makereport;


title; footnote;
ods layout start;

%makereport(wantapp=APP_A, wantconn=CONN1)
%makereport(wantapp=APP_A, wantconn=CONN2)
%makereport(wantapp=APP_B, wantconn=CONN1)

ods layout end;
&lt;/PRE&gt;
&lt;P&gt;many&amp;nbsp; thanks&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 17:17:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/681429#M24406</guid>
      <dc:creator>MART1</dc:creator>
      <dc:date>2020-09-03T17:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: compute after page. line ' ' to change dynamically</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/681517#M24410</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;The issue is that you need the controlling statements and can't get rid of them. I don't know how you're using SAS -- it almost sounds like you're using Enterprise Guide or one of the solution interfaces in which case, the default output that EG is creating could be the issue. Your SAS Administrator should be able to identify a location on the server where you can write output.&lt;BR /&gt;&lt;BR /&gt;ODS LAYOUT and ODS REGION have to be supported by the destination, including the default destination that your interface is using. The ODS Sandwich is needed in order to be sure you are sending the output to a destination that supports ODS LAYOUT and ODS REGION.&lt;BR /&gt;&lt;BR /&gt;Have you talked to your SAS Administrator about getting a location that you can write to? Otherwise, you could try to write the output to your WORK location and then navigate to your WORK location to find the output:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;%let &lt;FONT color="#0000FF"&gt;wpath&lt;/FONT&gt;=%sysfunc(pathname(WORK));&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;%put path to work location is: &lt;FONT color="#0000FF"&gt;&amp;amp;wpath&lt;/FONT&gt;;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;ods html(id=1) path="&lt;FONT color="#0000FF"&gt;&amp;amp;wpath&lt;/FONT&gt;" (url=none)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;file='wpath_layout.html';&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;%makereport(wantapp=APP_A, wantconn=CONN1) &lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;%makereport(wantapp=APP_A, wantconn=CONN2) &lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;%makereport(wantapp=APP_B, wantconn=CONN1) &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;** more invocations for macro program;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;ods html(id=1) close;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;And this shows that I got the 2 column output and the file is in my WORK location specified by the &lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;&amp;amp;WPATH&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt; macro variable:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1599170439944.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/49001i9164B7DD8A4870F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1599170439944.png" alt="Cynthia_sas_0-1599170439944.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I can show you an example of using CALL EXECUTE for the macro program. However, you need to figure out how to use the "full control" method of the ODS HTML sandwich in order to create your output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; My code works with ODS HTML, ODS HTML5, and ODS PDF to make 2 columns with the graph on the left and the table on the right. The code will NOT work in ODS RTF or ODS EXCEL (destinations that don't support ODS LAYOUT). The code also will not work in ODS LISTING or ODS CSV, which are also destinations that don't support ODS LAYOUT. If you look in your log, you should see a warning if the default destination does not support ODS LAYOUT:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1599171192407.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/49002iB9E39168B5DCC411/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1599171192407.png" alt="Cynthia_sas_1-1599171192407.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; As another example of how I would run this code in a server environment like SAS OnDemand for Academics, I would make an &lt;STRONG&gt;output&lt;/STRONG&gt; folder under my &lt;STRONG&gt;Files (Home)&lt;/STRONG&gt; directory in the OnDemand server and then do this:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;ods html5(id=2) path='/home/&amp;lt;userid&amp;gt;/output/' (url=none)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file='soda_layout.html';&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;%makereport(wantapp=APP_A, wantconn=CONN1) &lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;%makereport(wantapp=APP_A, wantconn=CONN2) &lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;%makereport(wantapp=APP_B, wantconn=CONN1) &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;** more invocations for macro program;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;ods html5(id=2) close;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Then I could use SAS Studio to go to the output folder to download the HTML file:&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditorCynthia_sas_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;Cynthia&lt;/P&gt;
&lt;P&gt;Example of Macro Program to invoke dynamically using CALL EXECUTE:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
** need to run this PROC FREQ to create WORK.OWLIST from work.char_table_sort;

ods output list=work.owlist(drop=table f_app f_conn);
proc freq data=char_table_sort;
  tables app*conn/nocum nopercent list;
run;
 
title; footnote;
ods html(id=2) path='c:\temp' (url=none)
         file='dynamic_layout.html' gtitle;

data _null_;
  length arg $100;
  set work.owlist(keep=app conn);
  arg = catt('%nrstr(%makereport(wantapp=',app, ', wantconn=',conn,'))') ;
  call execute(arg);
run; 

ods html(id=2) close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Using CALL EXECUTE is fairly advanced Macro programming, so you would really need to work on understanding Macro programming if you were going to use a method like CALL EXECUTE. There are other methods you could use, but you really need to resolve the server issue and file creation issue first.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 22:32:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/compute-after-page-line-to-change-dynamically/m-p/681517#M24410</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-09-03T22:32:38Z</dc:date>
    </item>
  </channel>
</rss>

