cancel
Showing results for 
Search instead for 
Did you mean: 

How to Show Total Calculation in Footer of Table

Former Member
0 Kudos

Hi everyone, is it possible to show total calculation in footer of table in webdynpro ? For the calculation, I think i can handle it because many thread in forum and weblog discuss it but for show it in footer of table , i can't find.

Display

A

B

C

D

...

...

...

...

...

...

...

...

...

...

...

...

| ____Total | XX | --> XX shows total calculation for column D

If this is not possible, how to trick it ? Thank you

null

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Even i had the same requirement once, but as this is not possible i.e displaying the total as the footeer of the table.

the other option for this is to hav a seperate table below the main table & then displaying the total in that table.

You can collect the value of each cell of column D in an integer variable at the time of displaying the data in the table.

A | B | C | D |

...

...

...

1

...

...

...

2

...

...

...

3

for(int i = 0;i<node.lenght();i++)

int tot = wdcontext.element

now at the end you can create the element of the node & assign this variable "tot" to that element, then add teh element to the node

Hope it helps you.

Regards

Jeet

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi jeet, you give me one picture but the problem is how to hide header column of the second table and make it glued with first table ? Thank you

First Table

A

B

C

| Total| | --> second table

Former Member
0 Kudos

Hi Satria/Jeet,

Its better to implete WD ALV instead of doing all these stuff. It has all the methods for the these kind of setting like Displaying totals , subtotals and setting the filter conditions. Very less coding will be there and easy to implement it also.

Warm Regards,

Vijay.

Former Member
0 Kudos

Hi Satria,

Set the VisibleRowCount = 1,FooterVisible = None,

set the visilble property of columns to none

This may help you.

Regards

Jeet

Former Member
0 Kudos

Hi,

Since the total is not editable, i suggest you for a textview.

Add a text view to your view and position it below the table.

Once you get the total, assign it to the textview context attribute.

I hope this helps you.

Thanks

Shriram

former_member189631
Active Contributor
0 Kudos

Hi Satria,

I dont think its possible in footer of a table.

But you can have a UI element in the header.

Regards,

Ramganesan K.