I'm trying to figure out if the following is possible. A picture is worth a thousand words...
I would like to have the cell in the rows under the across header link to other output.
Clicking on the data value in the cell (the n-statistic in this example) should link to an anchor corresponding output for [table][dn]
Example data:
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;
Hi:
Here's another picture from one of my PROC REPORT examples:
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.
Hope this points you in a direction that gets you closer to what you want.
Cynthia
Hi:
Here's another picture from one of my PROC REPORT examples:
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.
Hope this points you in a direction that gets you closer to what you want.
Cynthia
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.