<?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 ODS HTML, can a Proc REPORT across data cell link to other places in the output. in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-HTML-can-a-Proc-REPORT-across-data-cell-link-to-other-places/m-p/907383#M26447</link>
    <description>&lt;P&gt;I'm trying to figure out if the following is possible.&amp;nbsp; A picture is worth a thousand words...&lt;/P&gt;&lt;P&gt;I would like to have the cell in the rows under the across header link to other output.&lt;/P&gt;&lt;P&gt;Clicking on the data value in the cell (the n-statistic in this example) should link to an anchor corresponding output for [table][dn]&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RichardAD_0-1702323930995.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/91164i2AF481E293B7F63A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RichardAD_0-1702323930995.png" alt="RichardAD_0-1702323930995.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Example data:&lt;/P&gt;&lt;PRE&gt;data x;
  input k q;
datalines;
1 2
1 2
1 2
2 7
2 8
2 8
2 9
3 100
;

data y;
  input p r;
datalines;
0 0
1 1
2 2
3 3
3 3
3 3
3 3
3 3
4 1
4 2
;

proc sql ;
  create table xf as
  select 'x' as table, k, count(distinct q) as dn
  from x group by k;

proc sql ;
  create table yf as
  select 'y' as table, p, count(distinct r) as dn
  from y group by p;

data fs ;
  set xf yf;
run ;

proc sql;
  create table x2 as select *, count(distinct q) as dn from x group by k order by dn, k ;
  create table y2 as select *, count(distinct r) as dn from y group by p order by dn, p ;

ods html file='r.html' style=plateau;

proc report data=fs;
  title 'counts';
  column table dn ;
  define table / group ;
  define dn / across ;
run ;

proc print noobs data=x2;
  title 'x2';
  by dn ;
run;

proc print noobs data=y2;
  title 'y2';
  by dn ;
run;

ods html close;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Dec 2023 19:51:31 GMT</pubDate>
    <dc:creator>RichardAD</dc:creator>
    <dc:date>2023-12-11T19:51:31Z</dc:date>
    <item>
      <title>ODS HTML, can a Proc REPORT across data cell link to other places in the output.</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-HTML-can-a-Proc-REPORT-across-data-cell-link-to-other-places/m-p/907383#M26447</link>
      <description>&lt;P&gt;I'm trying to figure out if the following is possible.&amp;nbsp; A picture is worth a thousand words...&lt;/P&gt;&lt;P&gt;I would like to have the cell in the rows under the across header link to other output.&lt;/P&gt;&lt;P&gt;Clicking on the data value in the cell (the n-statistic in this example) should link to an anchor corresponding output for [table][dn]&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RichardAD_0-1702323930995.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/91164i2AF481E293B7F63A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RichardAD_0-1702323930995.png" alt="RichardAD_0-1702323930995.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Example data:&lt;/P&gt;&lt;PRE&gt;data x;
  input k q;
datalines;
1 2
1 2
1 2
2 7
2 8
2 8
2 9
3 100
;

data y;
  input p r;
datalines;
0 0
1 1
2 2
3 3
3 3
3 3
3 3
3 3
4 1
4 2
;

proc sql ;
  create table xf as
  select 'x' as table, k, count(distinct q) as dn
  from x group by k;

proc sql ;
  create table yf as
  select 'y' as table, p, count(distinct r) as dn
  from y group by p;

data fs ;
  set xf yf;
run ;

proc sql;
  create table x2 as select *, count(distinct q) as dn from x group by k order by dn, k ;
  create table y2 as select *, count(distinct r) as dn from y group by p order by dn, p ;

ods html file='r.html' style=plateau;

proc report data=fs;
  title 'counts';
  column table dn ;
  define table / group ;
  define dn / across ;
run ;

proc print noobs data=x2;
  title 'x2';
  by dn ;
run;

proc print noobs data=y2;
  title 'y2';
  by dn ;
run;

ods html close;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 19:51:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-HTML-can-a-Proc-REPORT-across-data-cell-link-to-other-places/m-p/907383#M26447</guid>
      <dc:creator>RichardAD</dc:creator>
      <dc:date>2023-12-11T19:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: ODS HTML, can a Proc REPORT across data cell link to other places in the output.</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-HTML-can-a-Proc-REPORT-across-data-cell-link-to-other-places/m-p/907444#M26448</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Here's another picture from one of my PROC REPORT examples:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1702335295669.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/91195i2561C80AD2A89944/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1702335295669.png" alt="Cynthia_sas_0-1702335295669.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In this example, Country is the first GROUP item and REGION (EAST or WEST) is the ACROSS item. In separate steps, I created 4 separate files, as shown in the screen shot (CanadaEast.html, CanadaWest.html, GermanyEast.html and GermanyWest.html). Then, a CALL DEFINE is used to dynamically build a URL for every cell under an ACROSS item. In this case, I attached the URL to the column for SUM and didn't do anything with the column for MEAN. In this way, you can see how absolute column numbers have to be used to determine which cell gets a link for which file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Hope this points you in a direction that gets you closer to what you want.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 22:58:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-HTML-can-a-Proc-REPORT-across-data-cell-link-to-other-places/m-p/907444#M26448</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-12-11T22:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: ODS HTML, can a Proc REPORT across data cell link to other places in the output.</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-HTML-can-a-Proc-REPORT-across-data-cell-link-to-other-places/m-p/907474#M26449</link>
      <description>Thanks, that's a start.&lt;BR /&gt;&lt;BR /&gt;Q: Is there a way to access the stacked column values that appear in the&lt;BR /&gt;headers?&lt;BR /&gt;&lt;BR /&gt;Right now I'm thinking I have to use Proc SQL before the REPORT in order to&lt;BR /&gt;have an array I can use...&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;select distinct dn into :dns separated by ',' from ... ;&lt;BR /&gt;&lt;BR /&gt;compute freq;&lt;BR /&gt;array dns(&amp;amp;dns);&lt;BR /&gt;... url formula involves _C_ and dns()...&lt;BR /&gt;endcomp;&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Dec 2023 06:27:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-HTML-can-a-Proc-REPORT-across-data-cell-link-to-other-places/m-p/907474#M26449</guid>
      <dc:creator>RichardAD</dc:creator>
      <dc:date>2023-12-12T06:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: ODS HTML, can a Proc REPORT across data cell link to other places in the output.</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-HTML-can-a-Proc-REPORT-across-data-cell-link-to-other-places/m-p/907544#M26451</link>
      <description>Hi:&lt;BR /&gt;  No, you cannot directly access the header values. The absolute column numbers should indicate which column is for EAST and which for WEST (in my example). &lt;BR /&gt;Cynthia</description>
      <pubDate>Tue, 12 Dec 2023 14:05:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-HTML-can-a-Proc-REPORT-across-data-cell-link-to-other-places/m-p/907544#M26451</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-12-12T14:05:59Z</dc:date>
    </item>
  </channel>
</rss>

