百分比显示出错
我用计算所得成员实现交叉表中两列比值。但是结果不是百分比的形式。系统产生的代码
//计算公式用于取代计算所得成员中的汇总。
// 此计算公式必须返回一个 货币 值。
If GridValueAt(CurrentRowIndex, GetColumnPathIndexOf(1996, "11月"), CurrentSummaryIndex)=0 then
0
Else
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf(1996, "10月"), CurrentSummaryIndex) /GridValueAt(CurrentRowIndex, GetColumnPathIndexOf(1996, "11月"), CurrentSummaryIndex)
我想加百分号
If GridValueAt(CurrentRowIndex, GetColumnPathIndexOf(1996, "11月"), CurrentSummaryIndex)=0 then
0
Else
Cstr((GridValueAt(CurrentRowIndex, GetColumnPathIndexOf(1996, "10月"), CurrentSummaryIndex))*100 /GridValueAt(CurrentRowIndex, GetColumnPathIndexOf(1996, "11月"), CurrentSummaryIndex))+"%"
公式没错,但是保存时候提示:此处需要一个数字。
在系统自动产生的公式上注释中有说明://计算公式用于取代计算所得成员中的汇总。
// 此计算公式必须返回一个 货币 值。
所以这样实现百分比的形式不可取。
现在问题是:
1、上述问题如何解决??
2、要在交叉表中实现两列比值结果以百分比形式显示,怎么实现??必须要计算所得成员?
之前泰哥也给建议了,我上述就是根据他的建议改的。