Skip to content

Commit 4411e9f

Browse files
committed
GetDefaultFormat
1 parent f95fcb3 commit 4411e9f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

MDX2JSON/ResultSet.cls.xml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ Returns meta-information about ResultSet.</Description>
5858
set tCubeIndex = ..%CubeKey
5959
set tQueryKey = ..%QueryKey
6060
set tCubeName = $$$UPPER(..%Cube)
61+
62+
6163
6264
set tAxisCount = ..%GetAxisCount()
6365
for a = 1:1:tAxisCount {
@@ -78,7 +80,8 @@ Returns meta-information about ResultSet.</Description>
7880
set info.cubeName = tCubeName
7981
set info.cubeClass = tCubeClass
8082
set info.rowCount = tRowCount
81-
set info.colCount = tColCount
83+
set info.colCount = tColCount
84+
set info.defaultFormat = ..GetDefaultFormat()
8285
8386
return info
8487
]]></Implementation>
@@ -145,7 +148,7 @@ Returns array of Axes</Description>
145148
set cell.caption = $LG(tNode,5) // text caption
146149
set cell.format = $LG(tNode,12) // format for numbers, eg: $## ###.##
147150
set cell.total = $LG(tNode,8) //COUNT,AVG function
148-
set cell.type = $LG(tNode,1) // mbr,cmbr,lit
151+
set cell.type = $LG(tNode,1) // mbr,cmbr,lit,exp
149152
set cell.valueID = $LG(tNode,6) // id in mdx dimension for mbr, path for cmbr
150153
set cell.path = ##class(%DeepSee.Query.Engine).%GetSpecForAxisNode(CubeName, QueryKey, AxisNumber, Node) // MDX cell path
151154
@@ -269,5 +272,12 @@ Returns array of cells (left-to-right, up-to-down)</Description>
269272
return data
270273
]]></Implementation>
271274
</Method>
275+
276+
<Method name="GetDefaultFormat">
277+
<ClassMethod>1</ClassMethod>
278+
<ReturnType>%String</ReturnType>
279+
<Implementation><![CDATA[ return "#"_##class(%SYS.NLS.Format).GetFormatItem("NumericGroupSeparator")_$TR($J("",##class(%SYS.NLS.Format).GetFormatItem("NumericGroupSize"))," ","#")
280+
]]></Implementation>
281+
</Method>
272282
</Class>
273283
</Export>

0 commit comments

Comments
 (0)