demos\medical\expenses.sdf
 1 TreeTable {
 2   name: "expensesTable"
 3   titleLocation: "top_left"
 4   borders {
 5     shadow [ thickness="7" ]
 6   } [ thickness="7" ]
 7   verticalAlign: "full"
 8   horizontalAlign: "full"
 9   bounds { x: "0"; y: "1" }
10   focusPainted: "false"
11   
12   /**
13    * Define an inline script that creates a data collection from a url,
14    * groups the data by the fourth and seventh columns and then
15    * populates a tree table with the result. The script is invoked
16    * via the onConfigure event
17    */
18   scriptURL:<< 
19     function configure() {
20       var al=window.createActionLink(widget,"data/expenses.txt")
21       window.createDataCollection("crossover",al,false,true)
22       groupBy(4,7)
23     }
24     function groupBy(col1, col2) {
25       var gp=sage.createGrouper()
26       var cols=new Array(2)
27       cols[0]=col1
28       cols[1]=col2
29       gp.columns=cols
30       gp.preserveFirst=true
31       gp.preserveRest=true
32       gp.formatForTable=true
33       gp.boldGroupTitles=true
34       var co=window.getDataCollection("crossover")
35       widget.handleGroupedCollection(co.group(widget,gp))
36     }
37   >> [ inline="true" ]
38   autoResizeMode: "none"
39   selectionMode: "single"
40   columnReorderingAllowed: "true"
41   columnSpanningAllowed: "true"
42   quickFindSupport: "search_bar"
43   boldColumnHeaders: "true"
44   gridLineType: "horizontal_lines"
45   alternatingHighlightColor: "defaultBackground+12"
46   alternatingHighlightType: "row"
47   autoSizeColumnsToFit: "true"
48   autoSizeRowsToFit: "false"
49   columnChooserEnabled: "true"
50   columns {
51     {width: "18!"; hideable: "false" }
52     {
53       title: "Service Date"
54       valueType: "date_type"
55       valueContext: "MM/dd/yy|MM/dd/yyyy"
56     }
57     {
58       title: "Processing Date"
59       valueType: "date_type"
60       valueContext: "MM/dd/yy|MM/dd/yyyy"
61     }
62     {title: "Claim Number" }
63     {title: "Patient Name" }
64     {title: "Service Provider" }
65     {title: "Service Description" }
66     {title: "Episode" }
67     {title: "Billed Amount"; valueType: "decimal_type"; valueContext: "'$'0.00" }
68     {
69       title: "Network Discount"
70       valueType: "decimal_type"
71       valueContext: "'$'0.00"
72     }
73     {title: "Balance Owed"; valueType: "decimal_type"; valueContext: "'$'0.00" }
74     {
75       title: "Paid by Insurance"
76       valueType: "decimal_type"
77       valueContext: "'$'0.00"
78     }
79     {
80       title: "Member Responsible"
81       valueType: "decimal_type"
82       valueContext: "'$'0.00"
83     }
84     {
85       title: "Applied to Deductible"
86       valueType: "decimal_type"
87       valueContext: "'$'0.00"
88     }
89   }
90   expandAll: "true"
91 } [ onConfigure="configure()" ]
92 
93 
94 
95