incendio Well-Known Member Licensed User Longtime User Nov 24, 2025 #1 Hi guys, New to B4XTable, have a columns, some of those columns is a number type and want to have a summary at the end of table. Is it possible to do this? Use this code to add total at last row B4X: Copy Tbl.sql1.ExecNonQuery2("INSERT INTO data VALUES(?,?,?)" , Array As Object("", "TOTAL", 10000)) Tbl.ClearDataView It worked OK, but only if users do not sort any columns. Is it possible to make summary row always at the end of table?
Hi guys, New to B4XTable, have a columns, some of those columns is a number type and want to have a summary at the end of table. Is it possible to do this? Use this code to add total at last row B4X: Copy Tbl.sql1.ExecNonQuery2("INSERT INTO data VALUES(?,?,?)" , Array As Object("", "TOTAL", 10000)) Tbl.ClearDataView It worked OK, but only if users do not sort any columns. Is it possible to make summary row always at the end of table?
Solution P P PaulMeuris Nov 24, 2025 Searching the forum I found this: Fixed row for summeries The solution is simple. Use a second B4XTable to display the summeries and synchronize the 2 B4XTables...
Searching the forum I found this: Fixed row for summeries The solution is simple. Use a second B4XTable to display the summeries and synchronize the 2 B4XTables...
aeric Expert Licensed User Longtime User Nov 24, 2025 #2 incendio said: It worked OK, but only if users do not sort any columns. Click to expand... Then you have to make sure the row must appear at the bottom. I may use a hidden column contains a sequence number. Let say the data rows are sorted in ascending order, then the summary row must have a number as huge as possible such as 9,999,9999. If the column contain alpabetical values then it must start with Zxxxx or something to ensure it also appear as the last row. My prefer way is to add some labels just below the B4XTable. I can also easily set the text formatting or text size as I like. It is very much easier. Upvote 0
incendio said: It worked OK, but only if users do not sort any columns. Click to expand... Then you have to make sure the row must appear at the bottom. I may use a hidden column contains a sequence number. Let say the data rows are sorted in ascending order, then the summary row must have a number as huge as possible such as 9,999,9999. If the column contain alpabetical values then it must start with Zxxxx or something to ensure it also appear as the last row. My prefer way is to add some labels just below the B4XTable. I can also easily set the text formatting or text size as I like. It is very much easier.
incendio Well-Known Member Licensed User Longtime User Nov 24, 2025 #3 Would like to add labels too, but there are some difficulties 1. In some cases, there are many columns that have summary, how to align these labels to the corresponding columns? 2. Mostly, in my app, table is horizontal scrollable, so labels also must be synchronized scroll too, which mean another complexity. Upvote 0
Would like to add labels too, but there are some difficulties 1. In some cases, there are many columns that have summary, how to align these labels to the corresponding columns? 2. Mostly, in my app, table is horizontal scrollable, so labels also must be synchronized scroll too, which mean another complexity.
aeric Expert Licensed User Longtime User Nov 24, 2025 #4 If you must make the summary row as part of the B4XTable, then you need to handle the special cases. As I mentioned, make use of hidden column (set column to invisible). Handle this row so it will not get sorted and excluded from the summary calculation. If it is too complicated to use the B4XTable as it is, then you have to modify the B4XTable class to suit your requirements. Upvote 0
If you must make the summary row as part of the B4XTable, then you need to handle the special cases. As I mentioned, make use of hidden column (set column to invisible). Handle this row so it will not get sorted and excluded from the summary calculation. If it is too complicated to use the B4XTable as it is, then you have to modify the B4XTable class to suit your requirements.
incendio Well-Known Member Licensed User Longtime User Nov 24, 2025 #5 Even if after modifications it can handle summary, but still sometimes I need Sub Total and to modify B4xtable to handle Sub Total, if it's even possible, is beyond my skill. A pity, b4xtable is easy to use, but for me, ultimate list view is more suitable. Upvote 0
Even if after modifications it can handle summary, but still sometimes I need Sub Total and to modify B4xtable to handle Sub Total, if it's even possible, is beyond my skill. A pity, b4xtable is easy to use, but for me, ultimate list view is more suitable.
aeric Expert Licensed User Longtime User Nov 24, 2025 #6 Yes, B4XTable is very straightforward. Just need to understand it is build with XCustomListView and in-memory SQLite. It is suitable for cross-platform development. I am not familiar with UltimateListView which is more close to what you are looking for. Upvote 0
Yes, B4XTable is very straightforward. Just need to understand it is build with XCustomListView and in-memory SQLite. It is suitable for cross-platform development. I am not familiar with UltimateListView which is more close to what you are looking for.
P PaulMeuris Well-Known Member Licensed User Nov 24, 2025 #7 Searching the forum I found this: Fixed row for summeries The solution is simple. Use a second B4XTable to display the summeries and synchronize the 2 B4XTables... Upvote 0 Solution
Searching the forum I found this: Fixed row for summeries The solution is simple. Use a second B4XTable to display the summeries and synchronize the 2 B4XTables...
incendio Well-Known Member Licensed User Longtime User Nov 27, 2025 #8 PaulMeuris said: Searching the forum I found this: Fixed row for summeries The solution is simple. Use a second B4XTable to display the summeries and synchronize the 2 B4XTables... Click to expand... That could be the solution To bad, already moved to ULV and it was done. Upvote 0
PaulMeuris said: Searching the forum I found this: Fixed row for summeries The solution is simple. Use a second B4XTable to display the summeries and synchronize the 2 B4XTables... Click to expand... That could be the solution To bad, already moved to ULV and it was done.