Wrapping a Table-Plus macro around a Report Macro
Asked by Ken Jessen:

Similar to: [https://answers.atlassian.com/questions/141319/table-plus-sorting-arrangement-feature-not-working-when-used-with-detailed-summary-macro-confluence?page=1#240513](/questions/141319/table-plus-sorting-arrangement-feature-not-working-when-used-with-detailed-summary-macro-confluence?page=1#240513)

I am trying to get a table-plus macro to sort a report macro

Confluence 5.3.

Table plugin 6.1

Report Tabel Macro

My code is a Table-Plus macro wrapping a Report Table macro.


Answers:
author: AndreasS
body: What is your problem/error message?

If you are interessting, you can also try to use Tableenhancer for Confluence (see <https://marketplace.atlassian.com/plugins/com.tngtech.confluence.plugins.tableenhancer>) which is completely open source and able to be used with any table, even generated ones ;)

comments: author: Ken Jessen
body: Hmmmmm. I'm using this in a template and getting two errors

On the preview:  
Tableenhancer
Icon  
com.tngtech.confluence.plugins.tableenhancer.warning.noTableFound

On the page itself:  
Tableenhancer
Icon  
com.tngtech.confluence.plugins.tableenhancer.warning.firstRowMustBeHeadingToSortTable

The first row of the report is blank, and every second row is blank as well.


author: AndreasS
body: Which Confluence version do you need since I can't reproduce it with v5.2.3.

![](../../upfiles/Bildschirmfoto_2013-12-09_um_02.19.45_2.png)

(Screenshot of report macro wrapped into tableenhancer and initial sorting on column 3)


author: Ken Jessen
body: Sorry. Confluence 5.3. Scaffolding 5.0.10. Reporting 4.2.3.


author: AndreasS
body: Unfortunately, my example works, see

![](../../upfiles/Bildschirmfoto_2013-12-09_um_08.49.25_1.png)

May you give me an example source code (e.g. using Confluence Source Editor)?


author: Andrey Khaneev _StiltSoft_
body: You can try [Table Filter](https://marketplace.atlassian.com/plugins/com.stiltsoft.confluence.plugin.tablefilter.tablefilter)'s [default sorting order](https://docs.stiltsoft.com/display/TableFilter/Managing+Look+of+the+Table+and+Filtration+Pane#ManagingLookoftheTableandFiltrationPane-Applyingthedefaultsortingordertocolumns) option.


author: Ken Jessen
body: It happens. My work around is to put an empty 1 line, header only, table in the 'report empty' macro. Good enough for now. Thx.

comments: author: AndreasS
body: Fair enough, if you have further problems, don't hesitate to contact us via opening an issue on [](https://tngtech-oss.atlassian.net/browse/TABENH)<https://tngtech-oss.atlassian.net/browse/TABENH>.


author: Ken Jessen
body: One more issue. When the table is empty, I get the following error:

Tableenhancer

Icon  
com.tngtech.confluence.plugins.tableenhancer.warning.noTableFound

It would be nice to avoid this.

comments: author: AndreasS
body: Hi Ken,

this is currently intended. How often do you have a case like that?

Cheers,  
Andreas


author: Ken Jessen
body: I am using this as part of a report on 'child' pages. As a result, when the page tree is empty, the report looks awful - quite shrunk down. As the tree gets populated, it looks better.

If there are some abnormal fields, the table can look bad too.

Thanks very much for your help.


author: Ken Jessen
body: Ahhh. I had the 'new column' box ticked on my first table column. Works now.

As a feature request, I would love to be able to specify the widths of each column as a % of the screen width.

comments: author: AndreasS
body: Great :)

I have added the feature request, see [https://tngtech-oss.atlassian.net/browse/TABENH-10](https://tngtech-oss.atlassian.net/browse/TABENH-10.). Do you have serious problem with the column width? Usually this should work automatically to max 100% of width and I am sure about the use case and/or priority?


author: Ken Jessen
body: Hmmmmm. I'm using this in a template and getting two errors

On the preview:  
Tableenhancer
Icon  
com.tngtech.confluence.plugins.tableenhancer.warning.noTableFound

On the page itself:  
Tableenhancer
Icon  
com.tngtech.confluence.plugins.tableenhancer.warning.firstRowMustBeHeadingToSortTable

The first row of the report is blank, and every second row is blank as well.


Tags: report

table-plus