on 12-24-2007 1:50 AM
Hi all,
I'm to create a table with a total-line at the end of the table, but I failed to make the columns width of the total-line to be consistent with that of the table rows. As follows:
What I want is:
______Date|__Payable|Receivable |
12/20/2007|_____100 |_______100 |
12/21/2007|_____200 |_______200 |
----
_____Total |______300 |_______300 |
I created 3 separated fields for the total-line.
What I get is:
______Date|__Payable|Receivable |
12/20/2007|_____100 |_______100 |
12/21/2007|_____200 |_______200 |
----
__Total |______________300 |______________300 |
Could anyone please tell me that, how to set the total-line's columns width just the same as the table rows'?
Thanks in advance.
Hi,
create a new element and use the following format.
element.setdate("Total");
element.setpayable("300");
element.setreceivable("300");
wdContext.node<name>().addElement(element);
xxxxxxxxxxxxxxxxxxxx
Regards,
Subashini.J
Edited by: Armin Reichert on Jan 1, 2008 3:51 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Subashini,
Thank you for your advice. But this is not what I want.
In your code, the total-line is appended after the last table row, which may not appear on the first page of the table. And also, "Total" field doesn't has a date type, which prevents me from doing so.
What I want is, the total-line is separated from the table, but just the same column-width with the table rows.
Whatever the table rows and table pages are, the total-line always appears just below the table.
Hi,
Do you really want to keep the total row seperated? If no, then you can try this:
1. Insert a "FixedBottomCell" to each of the table columns.
2. Insert a "TextView" as the editor for the first FixedBottomCell. Set the "text" property to "Total".
3. Similarly insert TextViews to other FixedBottomCells as well and bind their text property to the appropriate context attributes.
Regards,
Satyajit.
Hi Praveen,
Thank you for your suggestion.
It seems to work, but not very well. Besides, it limits me much.
In my example, because the first column could be "12/24/2007" (in Original_Table) or "Total" (in Total_Line_Table), the column has to take a type string, while type date couldn't be used any more.
Even so, even the Original_Table and Total_Line_Table have taken the same strucuture, the output length of the first column is still different - "12/24/2007" is much longer than "Total".
Could anyone provide a better solution?
Merry X'mas.
Edited by: gangtee gangtee on Dec 24, 2007 9:20 PM
Hi Gangtee,
I am not very sure of the solution, but what you can try is, set the "Width" property of both the corresponding columns, in both the tables, to same values.
With this, it may happen that, in the Table diaplaying Total, it will fall short off, for the first column. At this, you can set the width of second table, a bit more than the corresponding column from first table.
Hope it helps.
Regards,
Alka.
Hi,
Create one separate node for the total and set its value attributes.
Create another table with no header and footer with the same width as that of the first table. Make visible rowcount as -1.
Place these 2 tables in the same transparent container without any space between the 2 tables (i.e without any invisible element between 2 tables).
It will look like a single table.
Hope this might solve your problem if my understanding is correct.
Regards,
Subashini.J
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.