Shouldn't this reports deliver the same output ?
Hi,
i have this scaffolding template on pages under "Anwendungen"
{table-data:tbSRVRUNAPP}
|| Name ||Funktion||
| {hidden-data}{text-data:txtSRVRUNAPPNAME|width=15em}{text-data}{hidden-data}{hide-if:action=edit}{replace-and-render}{replace-item:%SYSTEMNAME%}{get-data:txtSRVRUNAPPNAME}{replace-item}{replace-body}[%SYSTEMNAME%]{add-label:%SYSTEMNAME%}{replace-body}{replace-and-render}{hide-if}
| {text-data:txtSRVRUNAPPDESC|width=45em}{text-data}
| {table-data}
I try to filter the pages by scaffolding data within the table.
First i use this report with the collection filter within the local reporter
{report-table}
{local-reporter:content:children|source=Anwendungen}
{collection-filter:data:tbSRVRUNAPP|matchItems=any}
{text-filter:data:txtSRVRUNAPPNAME|include=(?i)Jira01}
{collection-filter}
{local-reporter}
{report-column:title=Anwendung}{report-info:content:title|link=true}{report-column}
{report-column:title=Funktion dieses Servers}{report-block}
{local-reporter:data:tbSRVRUNAPP}
{text-filter:data:txtSRVRUNAPPNAME|include=(?i)Jira01}
{local-reporter}
{report-body}
{report-info:data:txtSRVRUNAPPDESC}
{report-body}
{report-block}{report-column}
{report-table}
works great
but with the collection filter outside the local reporter, there are a lot of empty lines
{report-table:injected=true}
{local-reporter:content:children|source=Anwendungen}
{local-reporter}
{collection-filter:data:tbSRVRUNAPP|matchItems=any}
{text-filter:data:txtSRVRUNAPPNAME|include=(?i)Jira01}
{collection-filter}
{report-column:title=Anwendung}{report-info:content:title|link=true}{report-column}
{report-column:title=Funktion dieses Servers}{report-block-1}
{local-reporter:data:tbSRVRUNAPP}
{text-filter:data:txtSRVRUNAPPNAME|include=(?i)Jira01}
{local-reporter}
{report-body-1}
{report-info:data:txtSRVRUNAPPDESC}
{report-body-1}
{report-block-1}{report-column}
{report-table}
So i think that the collection-filter outside the local-reporter processes the results from the local-reporter afterwards. But shouldn't it prevent the empty results from beeing shown ?
i have this scaffolding template on pages under "Anwendungen"
{table-data:tbSRVRUNAPP}
|| Name ||Funktion||
| {hidden-data}{text-data:txtSRVRUNAPPNAME|width=15em}{text-data}{hidden-data}{hide-if:action=edit}{replace-and-render}{replace-item:%SYSTEMNAME%}{get-data:txtSRVRUNAPPNAME}{replace-item}{replace-body}[%SYSTEMNAME%]{add-label:%SYSTEMNAME%}{replace-body}{replace-and-render}{hide-if}
| {text-data:txtSRVRUNAPPDESC|width=45em}{text-data}
| {table-data}
I try to filter the pages by scaffolding data within the table.
First i use this report with the collection filter within the local reporter
{report-table}
{local-reporter:content:children|source=Anwendungen}
{collection-filter:data:tbSRVRUNAPP|matchItems=any}
{text-filter:data:txtSRVRUNAPPNAME|include=(?i)Jira01}
{collection-filter}
{local-reporter}
{report-column:title=Anwendung}{report-info:content:title|link=true}{report-column}
{report-column:title=Funktion dieses Servers}{report-block}
{local-reporter:data:tbSRVRUNAPP}
{text-filter:data:txtSRVRUNAPPNAME|include=(?i)Jira01}
{local-reporter}
{report-body}
{report-info:data:txtSRVRUNAPPDESC}
{report-body}
{report-block}{report-column}
{report-table}
works great
but with the collection filter outside the local reporter, there are a lot of empty lines
{report-table:injected=true}
{local-reporter:content:children|source=Anwendungen}
{local-reporter}
{collection-filter:data:tbSRVRUNAPP|matchItems=any}
{text-filter:data:txtSRVRUNAPPNAME|include=(?i)Jira01}
{collection-filter}
{report-column:title=Anwendung}{report-info:content:title|link=true}{report-column}
{report-column:title=Funktion dieses Servers}{report-block-1}
{local-reporter:data:tbSRVRUNAPP}
{text-filter:data:txtSRVRUNAPPNAME|include=(?i)Jira01}
{local-reporter}
{report-body-1}
{report-info:data:txtSRVRUNAPPDESC}
{report-body-1}
{report-block-1}{report-column}
{report-table}
So i think that the collection-filter outside the local-reporter processes the results from the local-reporter afterwards. But shouldn't it prevent the empty results from beeing shown ?
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
-
Inappropriate?Hmm,
as i just noticed report-block shows the same behaviour when you use separator=newline
-
Inappropriate?I'm not exactly sure what you're expecting for the output, but with {report-table}/{report-column} in particular, putting a filter in front of the column will still output the column, it will just be empty if it doesn't match. The reason for this is that if it doesn't output the empty cell, all the other cells will be out of order.
Is that what you're talking about? I'm not exactly sure... -
Inappropriate?Hi,
yes you're right. That's what i'm talking about.
I did hope that this empty rows won't appear.
regards Christian -
Inappropriate?Are you saying your first report doesn't give you what you want? If you want to skip rows that have a blank for the filter value, it has to go in the reporter, not in front of the {report-column}. What can't you achieve with your first report?
-
Inappropriate?Hi,
i attached an image so you can see my results.
The background of all this is, that i want to improve performance of some of my markup.
I have three reports cycling through the same children of a page called "Anwendungen" with a difference only in the filters.
So i thought it might be possible to set the local-reporter once to the children of "Anwendungen" and filter the output in the body.
see markup above.
-
Inappropriate?<h1> markup </h1>
i also attached this as a file </>
h4. +Auf diesem Server laufende Anwendungen+
{report-table}
{local-reporter:content:children|source=Anwendungen}
{collection-filter:data:tbSRVRUNAPP|matchItems=any}
{text-filter:data:txtSRVRUNAPPNAME|include=(?i)Jira01}
{collection-filter}
{local-reporter}
{report-column:title=Anwendung}{report-info:content:title|link=true}{report-column}
{report-column:title=Funktion dieses Servers}{report-block}
{local-reporter:data:tbSRVRUNAPP}
{text-filter:data:txtSRVRUNAPPNAME|include=(?i)Jira01}
{local-reporter}
{report-body}
{report-info:data:txtSRVRUNAPPDESC}
{report-body}
{report-block}{report-column}
{report-table}
h4. +Von diesem Server abhängige Anwendungen+
{report-table}
{local-reporter:content:children|source=Anwendungen}
{collection-filter:data:tbSRVDEPAPP|matchItems=any}
{text-filter:data:txtSRVDEPAPPNAME|include=(?i)AIX3}
{collection-filter}
{local-reporter}
{report-column:title=Anwendung}{report-info:content:title|link=true}{report-column}
{report-column:title=Funktion dieses Servers}{report-block}
{local-reporter:data:tbSRVDEPAPP}
{text-filter:data:txtSRVDEPAPPNAME|include=(?i)AIX3}
{local-reporter}
{report-body}
{report-info:data:txtSRVDEPAPPDESC}
{report-body}
{report-block}{report-column}
{report-table}
h4. +Sonstige im Zusammenhang mit diesem Server stehende Anwendungen+
{report-table}
{local-reporter:content:children|source=Anwendungen}
{collection-filter:content:labels|matchItems=any}
{text-filter:label:title|include=(?i)Jira01}
{collection-filter}
{local-reporter}
{report-column} {report-info:content:title|link=true} {report-column}
{report-column} {report-info:data:txtCOMMON} {report-column}
{report-table}
the filters will later be set dynamically by a surrounding report-on:injected=true
If you know a faster way in doing this reports i would be glad.
the result should look like the above image

I was also experimenting with expanding reporter. Is this faster ?
{report-table}
{expanding-reporter:data:tbSRVRUNAPP|as=SRVTABLE}
{local-reporter:content:children|source=Anwendungen}
{collection-filter:data:tbSRVRUNAPP|matchItems=any}
{text-filter:data:txtSRVRUNAPPNAME|include=(?i)Jira01}
{collection-filter}
{local-reporter}
{expanding-reporter}
{report-column:title=Anwendung}{report-info:expanded:item>content:title|link=true}{report-column}
{report-column:title=Funktion dieses Servers}{report-block}
{local-reporter:expanded:SRVTABLE}
{text-filter:data:txtSRVRUNAPPNAME|include=(?i)Jira01}
{local-reporter}
{report-body}
{report-info:data:txtSRVRUNAPPDESC}
{report-body}
{report-block}{report-column}
{report-table}
-
Inappropriate?The reports already look pretty efficient. One possible improvement might be using the '{content-filter} rather than the {collection-filter}/{text-filter} combo. Just replace your {collection-filter} sections with
{content-filter:@self|label=+Jira01}
I'm not sure if this will be faster or slower though, but it's an alternative.
That said, with what seems to be a small number of children on each page, I'm wondering if it's actually Reporting that's the actual slow-down. Have you checked the performance difference between 0 reports, 1, 2 and 3? How many children does the 'Anwendung' page actually have?
1 person says
this answers the question
-
Inappropriate?And to answer your other question, {expanding-reporter} is unlikely to be faster. One possiblity with Reporting 3.2.0 would be the {grouping-reporter}. You could try grouping by the values you're filtering on, then looping through the groups and outputting a {report-table} within each group. However, I'm not certain it would actually be any faster - there is a reasonable amount of extra processing for both {grouping-reporter} and {expanding-reporter}, so it would depend on how slow the report is in general...
1 person says
this answers the question
-
Inappropriate?Hi David,
thx for the answers. I'll try the content-filter for the 3rd report.
The page "Anwendungen" has at this time about 60 children.
It's not a general performance problem of this reports. The main problem is that there are other reports on the templates, so i tried to be most efficient at every report. And if i am able to save some loops, e.g. cycling through all childrens in this case, i would do it.
I thought with the filtering in front of the columns the procedure was something like:
(local-reporter:content:chidlren) get all children and save them temporarily
{collection-filter} filter the above list and save them temporarily till next filter or end of block
(report-column)show all entries from the last filter -
Inappropriate?When you have a filter in front of a {report-column} (or {report-body}) it will essentially check with the filter as it iterates through each item to determine if that particular column or body block will be executed. If the filter passes, it is, if not, it's not. In the case of {report-column} it has to output a blank table cell or alignment gets all out of wack.
WIth more complex reports Reporting 3.2 lets you save the basic report using {report-variable}, then use it by pulling it back in via {local-reporter}. This could be useful for other reports where there are shared filters, etc across multiple reports.
In this case, {cache} is probably your best path to efficiency if it's a heavily trafficked page.
1 person says
this answers the question
-
Inappropriate?Ah ok. Now i understand.
Too bad that it outputs an empty line.
Using cache-macro might be an interim fix but i think the report-variable is more interesting.
So i'll wait till we upgrade to Confluence 3.0.
thanks a lot David
i'm always glad about your help.
Loading Profile...



EMPLOYEE