Skip to Content
0
May 05, 2015 at 09:56 AM

Unable to bind rows in sap.ui.table.AnalyticalTable

600 Views

Hi experts,

I am trying to use sap.ui.table.AnalyticalTable in xml view, but I am not able to bind the table to any data.

There are few samples for this control so I hope someone can give me some hint.

In API, it says:

The supported settings are:

In addition, all settings applicable to the base type sap.ui.table.Table can be used as well.

Then I almost copy the same setting as sap.ui.table.Table in my xml view.

But the rows aggregation can not be binded.

For the below sap.ui.table.Table I can get the data.

========table===========

<table:Table id="idTable" selectionMode="None"

rows="{/PaymentsOverview}">

<table:columns>

<table:AnalyticalColumn>

<Text text="{i18n>PolicyNumber}" />

<table:template>

<Label text="{TargetValue}"></Label>

</table:template>

</table:AnalyticalColumn>

<table:AnalyticalColumn>

<Text text="{i18n>Policyholder}" />

<table:template>

<Label text="{TargetValue}"></Label>

</table:template>

</table:AnalyticalColumn>

<table:AnalyticalColumn>

<Text text="{i18n>Insured}" />

<table:template>

<Label text="{TargetValue}"></Label>

</table:template>

</table:AnalyticalColumn>

<table:AnalyticalColumn>

<Text text="{i18n>CollectedPremium}" />

<table:template>

<Label text="{TargetValue}"></Label>

</table:template>

</table:AnalyticalColumn>

<table:AnalyticalColumn>

<Text text="{i18n>AdjustedPremium}" />

<table:template>

<Label text="{TargetValue}"></Label>

</table:template>

</table:AnalyticalColumn>

</table:columns>

</table:Table>

====================

But for the below AnalyticalTable I have no luck:

=======Analytical Table=========

<table:AnalyticalTable id="idATable"

selectionMode="None">

<table:columns>

<table:AnalyticalColumn>

<Text text="{i18n>PolicyNumber}" />

<table:template>

<Label text="{TargetValue}"></Label>

</table:template>

</table:AnalyticalColumn>

<table:AnalyticalColumn>

<Text text="{i18n>Policyholder}" />

<table:template>

<Label text="{TargetValue}"></Label>

</table:template>

</table:AnalyticalColumn>

<table:AnalyticalColumn>

<Text text="{i18n>Insured}" />

<table:template>

<Label text="{TargetValue}"></Label>

</table:template>

</table:AnalyticalColumn>

<table:AnalyticalColumn>

<Text text="{i18n>CollectedPremium}" />

<table:template>

<Label text="{TargetValue}"></Label>

</table:template>

</table:AnalyticalColumn>

<table:AnalyticalColumn>

<Text text="{i18n>AdjustedPremium}" />

<table:template>

<Label text="{TargetValue}"></Label>

</table:template>

</table:AnalyticalColumn>

</table:columns>

</table:AnalyticalTable>

=================================

If I added the "rows" property, I got error:

Can anyone help or provide some samples?

Thanks a lot.

Kind regards,

Kenny

Attachments

1.png (7.4 kB)