@@ -122,12 +122,29 @@ Returns array of Axes</Description>
122122 set tQueryKey = ..%QueryKey
123123
124124 set axis=##class(%ZEN.proxyObject).%New()
125- //d ##class(%DeepSee.Utils ).%GetDimensionCaption(tCubeName,1, tHierNo,tLevelNo, .tAxisCaption )
125+ set axis.tuples = ##class(%ListOfObjects ).%New( )
126126
127- //set axis.caption = $zobjclassmethod($G($$$DeepSeeMetaGLVN("cubes",tCubeName)),"%GetMemberCaption",$$$UPPER(tDimName))
128- //set axis.spec = $G($$$DeepSeeAxisGLVN(CubeIndex,AxisKey,"spec"))
127+ do ..%GetAxisMembers(AxisNumber,.pKey) // Fills ^||DeepSee.AxisMembers(pKey) global
129128
130- set axis.tuples = ..ProcessOneAxisCell(CubeIndex, AxisKey, tCubeName, tQueryKey, AxisNumber, 1)
129+ set nodekey = 1 // this is the number of the top node
130+ set startnode=-1 // initial node number for ^DeepSee.Cache.Axis(CubeIndex,AxisKey,"axes",startnode)
131+ do {
132+ set startnodelist = ^||DeepSee.AxisMembers(pKey,AxisNumber,nodekey,0) // 1 - start, 0 - level
133+
134+ if (startnode '= $lg(startnodelist,1)) {
135+ set startnode = $lg(startnodelist,1)
136+ } else {
137+ // we're here if we have several same top-level cells
138+ // for example year on the zero level and several months on the first
139+ // the year cell would be repeated as many times as there are months
140+ set nodekey = $o(^||DeepSee.AxisMembers(pKey,AxisNumber,nodekey))
141+ CONTINUE
142+ }
143+
144+ do axis.tuples.Insert(..ProcessOneAxisCell(CubeIndex, AxisKey, tCubeName, tQueryKey, AxisNumber, startnode))
145+
146+ set nodekey = $o(^||DeepSee.AxisMembers(pKey,AxisNumber,nodekey)) // get next top-level cell
147+ } while (nodekey'="")
131148
132149 return axis
133150]]> </Implementation >
@@ -139,7 +156,7 @@ Returns array of Axes</Description>
139156<ReturnType >%ZEN.proxyObject</ReturnType >
140157<Implementation ><![CDATA[
141158 set cell=##class(%ZEN.proxyObject).%New()
142-
159+
143160 set tNode = $G($$$DeepSeeAxisGLVN(CubeIndex,AxisKey,"axes",Node))
144161 set tDimNo = $LG(tNode,9)
145162 set tHierNo = $LG(tNode,10)
@@ -192,34 +209,12 @@ Returns array of Axes</Description>
192209
193210 set key = $O($$$DeepSeeAxisGLVN(CubeIndex, AxisKey, "axes", Node, "ch", key))
194211 }
195-
196-
197- // To filter out invisible top-level сells
198- if (..IsCellNull(cell.caption, cell.path)=1) {
199- return cell.children
200- }
201212 }
202213
203214 return cell
204215]]> </Implementation >
205216</Method >
206217
207- <Method name =" IsCellNull" >
208- <Description >
209- Determine if cell is an invisyble system cell.</Description >
210- <ClassMethod >1</ClassMethod >
211- <FormalSpec >caption,path</FormalSpec >
212- <ReturnType >%Boolean</ReturnType >
213- <Implementation ><![CDATA[
214- return:(caption=0) 1
215- return:(caption=1) 1
216- return:(caption="") 1
217- return:(caption'="") 0
218- return:(path="") 1
219- return 0
220- ]]> </Implementation >
221- </Method >
222-
223218<Method name =" DataToProxyObject" >
224219<Description >
225220Returns array of cells (left-to-right, up-to-down)</Description >
0 commit comments