Jump to content

BIRT Developer Center

DevShare Source for user-contributed BIRT articles, tips and code

Devshare Home >> Combing Two Groups into One to Avoid an Empty TOC Level
- - - - -

Combing Two Groups into One to Avoid an Empty TOC Level

Download Resource


Example showing how to combine two groups into one to avoid and unwanted outer grouping bookmark in the TOC.

Full Description:

This example shows a way to use multiple fields in a group expression to avoid using multiple groups. This example is a solution to a problem where a forum poster wanted to be able to hide an outer grouping in the TOC, while showing the groupings underneath it.

In the example, the second grouping in the table combines two fields, but the TOC expression is set to only show the second field. Without this method, the normal solution of simply removing the TOC expression leaves a blank bookmark, rather than not creating it. If there wasn't a grouping under it, the no expression solution would work as expected. Some simple scripting and a visibility expression is also used to only show the midde "grouping" at the correct time. This report was created in BIRT 3.7.2.

This report is explained further in this blog post.