No such tuple on axis 0 error on iReport

2019-09-17 15:31发布

问题:

How can I get measures value on iReport?

select 
 [Reg].[region].Children *
  {
    [measures].[mtot],
    [measures].[wtot]
  } on columns,
 [Title].[titlekhas].Children on rows 
from report1


There is my MDX query.

I have try add fields on iReport.
When I add the rows and cloumns with this expression it works

<field name="Region" class="java.lang.String">
  <fieldDescription><![CDATA[Columns[Reg][ListRegion]]]></fieldDescription>
</field>
<field name="Title" class="java.lang.String">
  <fieldDescription><![CDATA[Rows[Title][Title]]]></fieldDescription>
</field>

But when i add measures with this expression

<field name="mtot" class="java.lang.Number">
  <fieldDescription><![CDATA[Data([Reg].[region],?)]]></fieldDescription>
</field>

It return No such tuple (...) on axis 0

Am I doing wrong? Every answer will be thankful.

回答1:

I called measures with specific expression

<field name="Kuala Belait Man" class="java.lang.Number">
   <fieldDescription><![CDATA[Data(([Reg.hiReg].[region].[Kuala Belait], [Measures].[mtot]),?)]]></fieldDescription>
</field>