BookmarkSubscribeRSS Feed
syam_india_kochi
Calcite | Level 5
Hi,

I was a bit curious to know whether it is possible for us to create a drill down(group) or collapsing in proc report.

Eg:

Proc report output:

Zone Region Count Value

East kolkatha 5 1000
East Orissa 7 500
East Assam 3 200
E.Total --- 15 1700
North Delhi 5 300
North UP 6 200
N.Total ----- 11 500
South Kerala 10 6000
South Tamilnadu 5 500
S.Total ------- 15 6500
West Mumbai 20 1000
West Gujrat 14 800
W.Total ------- 34 1800
GrandTotal --------- 75 10500




What I want is, in the summary page a plus "+" symbol should come which when I click should expand to give the total values...ie in the report I should have only Zone summary as shown below..

Zone Region Count Value
(+)E.Total ------------------ 15 1700
(+)N.Total ------------------ 11 500
(+)S.Total ------------------ 15 6500
(+)W.Total ------------------ 34 1800
GrandTotal ------------------ 75 10500


I have succeded in giving a link at each zone value and the correponding page will be opened in a seperate page..But if it is possible to give a drill down that would be perfectly fine..


Thanks in advance..
Syam
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
Generally, when folks define a hyperlink in PROC REPORT and that hyperlink goes to another page, that -is- considered a "drill-down" even if the original link is drilling down to a new HTML page. That is the most common form of static drill-down available out of the box with PROC REPORT -- the URL= option.

The type of "expanding" information you describe sounds like dynamic HTML or HTML with embedded Javascript or possibly PHP or ???? It almost sounds to me like you want the HTML page to act like an Excel Pivot Table. I believe you will either:
1) have to code the JavaScript/DHTML/PHP yourself by modifying the HTML4 tagset template (or using techniques such as the one discussed here:
http://support.sas.com/kb/24/068.html
or
2) if this type of drill-down behavior is possible with XML and an XSL transform, then code a custom XML tagset template and a custom XSL transform
or
3) create an Excel Pivot Table out of your report data (I believe this is possible using the TAGSETS.TABLEEDITOR destination, which creates HTML with embedded JavaScript to enable the HTML file to be opened in Excel. http://support.sas.com/rnd/base/ods/odsmarkup/tableeditor/index.html )

With the SAS Add-in for Microsoft Office, you could build your Pivot Table directly from a SAS data source. But, the SAS Add-in is part of the Platform for Business Analytics. And, of course, the Platform also has OLAP cube capability, which also has the kind of expansion and drill-down features that you describe.

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 963 views
  • 0 likes
  • 2 in conversation