1
votes

I am using BIRT v.3.7.2. I am trying to create a report that has section headers, subsection headers, & then detail rows. I have no issue creating the Section header & the detail row, it is the subsection headers that are throwing me off.

The report will be in the format

Section 1                  State #
 Subsection 1            NC      ND      NE      NH      NJ 
   Question 1          result  result  result  result  result 
   question 2          result  result  result  result  result 
 Subsection 2            NC      ND      NE      NH      NJ
  question 3           result  result  result  result  result 
  question 4           result  result  result  result  result 

Section 2                  State
  Subsection 3           NC      ND      NE      NH      NJ
   question 5          result  result  result  result  result 
   question 6          result  result  result  result  result 
  Subsection 4           NC      ND      NE      NH      NJ
   question 7          result  result  result  result  result 
   question 8          result  result  result  result  result 

As I stated, without the subsection headers this would not be an issue, but no matter what I seem to do with formatting, I get either duplicate subsections or null section information.

1

1 Answers

0
votes

So the answer to this was to not use a cross tab to do it all.

I started by splitting my query into 2 queries. One to get the sections, subsection & question numbers & question text.

I then created one to get the question numbers, their associated results, & regions for each result.

I then created table as normal, using the first query, with 1 group with a header row for the section headers, & a second group with a section header for the subsection. I then put the question number & question text in the detail row. This is all what I normally would have done, had I not needed the dynamic columns.

Next I created a data cube from the results of my second query. The groups were the region & question number. The summary was the result.

I then created a crosstab & added it to the table in the second column of the detail row. I had region define the columns, & question number define the rows. The result went in the summary section.

This got me close, but not all the way. This post [http://www.eclipse.org/forums/index.php/t/272293/] got me the rest of the way. What it states is that you have to filter the crosstab. So I added a filter for when the crosstab question number = outer table question number.

And that got me my result, just like stated above.