The SAS Output Delivery System and reporting techniques

drill down or Collapsing of a group in Proc report

Reply
Occasional Contributor
Posts: 15

drill down or Collapsing of a group in Proc report

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
SAS Super FREQ
Posts: 8,869

Re: drill down or Collapsing of a group in Proc report

Posted in reply to syam_india_kochi
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
Ask a Question
Discussion stats
  • 1 reply
  • 193 views
  • 0 likes
  • 2 in conversation