I've seen recipes that leverage the Scaffolding plugin to combine tables from child pages onto a parent page with a {report-table} . I'd like to share a way to accomplish something similar without using the Scaffolding plugin.
{report-table} {expanding-reporter:content:body > text:find ([^\\\\u007c]+)\\\\u007c([^\\\\u007c]+)\\\\u007c([^\\\\u007c]+)\\\\u007c([^\\\\u007c]+)\\\\u007c([^\\\\u007c]+)\\\\u007c([^\\\\u007c]+)\\\\u007c[\\\\r\\\\n](\\?\\=[\\\\s\\\\S]*Next.Section)|as=foo} {local-reporter:content:children} {local-reporter} {expanding-reporter} {report-column:title=First Column|width=10em}{report-info:expanded:foo > match:group 1|render=wiki}{report-column} {report-column:title=Second Column|width=10em}{report-info:expanded:foo > match:group 2|render=wiki}{report-column} {report-column:title=Third Column|width=10em}{report-info:expanded:foo > match:group 3|render=wiki}{report-column} {report-column:title=Fourth Column|width=10em}{report-info:expanded:foo > match:group 4|render=wiki}{report-column} {report-column:title=Sixth Colum|width=10em}{report-info:expanded:foo > match:group 5|render=wiki}{report-column} {report-column:title=Seventh Column|width=10em}{report-info:expanded:foo > match:group 6|render=wiki}{report-column} {report-column:title=Eight Column|width=10em}{report-info:expanded:item > content:title > text:match (Report - YYYYMMDD - )(.*) > match:group 2}{report-column} {report-table}
Some notes about this:
If folks have any interest or questions, I can post more of an explanation. But I think for most folks familiar with the Reporting plugin will find this helpful.
Here's the new supplier chain in the expanding-reporter:
content:body > body:text > text:find "<tr><td.*?>(.*?)</td><td.*?>(.*?)</td></tr>"
There's more than a few problem with the code I posted due to upgrade incompatabilities.
For starters, one now has to be explicit with suppliers:
"expanding-reporter:content:body > text:find" will no longer work. It has to be:
"expanding-reporter:content:body > body:text > text:find"
It's no longer possible to "shortcut" the supplier chain. I think this might be part of your problem Tom.
Additionally, the regex no longer works because the underlying structure is XHTML instead of wiki markup.
I'll try and post a new "fixed" example later.
In regards to your other question, wow, I'm not sure. You would have to somehow include all children in a space and then apply a fliter on the label?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ryan,
thanks for sharing this approach!
Unfortunately, I can't get it working. I guess the issue I have is related to some update of the reporting plugin. I get the message, that I need to provide the key to expand on.
May you be able (in a free minute) to post two example tables and the report-on mark-up for combining those two tables?
I would also need to run this report on all pages having specific labels across all spaces. Should I use the content-reporter with the scope @global instead of the local-reporter in order to achieve this?
Thanks for your help & Cheers,
Tom
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using the “children” macro on my pages.
I would like to combine the output of multiple children pages, such as:
{children:page=Service Coordination\|depth=1\|style=h4}
{children:page=Financials\|depth=1\|style=h4}
{children:page=Asset Management\|depth=1\|style=h4}
But I want to sort them as ALL children pages, instead of as separate sections.
I am looking to merge the output and sort data.
Is this possible?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, I am new to Confluence. But I need advice and if what you proprose above can help me.
I am using the “children” macro on my pages. I would like to combine the output of multiple children pages, such as:
{children:page=Service Coordination\|depth=1\|style=h4}
{children:page=Financials\|depth=1\|style=h4}
{children:page=Asset Management\|depth=1\|style=h4}
But I want to sort them as ALL children pages, instead of as separate sections.
I am looking to merge the output and sort data.
Is this possible?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.