Home
Analytics
Flow report content across multiple page columns
kaiserfro
I'm working on a simple report that has multiple groupings and such. The data shown for each detail section is pretty small, so I'm looking for a way to make better use of a page. What I'd like to do is flow the data from column to column across the page. The details section fits very nicely in about 3in. of space, so taking a standard 8.5x11 sheet of paper, i can fit 2 columns in portrait or 3 columns landscape.<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
Group A Header | Group B Header
Group B Header | Details
Details | Group B Header
Group B Header | Details
Details | ....
<goto nxt col> |
----page break
Group A Header
...and so on
</pre>
Is there a way to layout the report in this fashion?
Find more posts tagged with
Comments
mwilliams
Hi kaiserfro,
Take a look at this archived webinar. It'll show you how to create a columnar style report using a grid, multiple tables, and filters. Let me know if you have any questions.
http://www.birt-exchange.org/org/devshare/designing-birt-reports/985-webinar-archive:-hot-birt-tips-from-the-forums/
kaiserfro
Thanks for the reply.
I have read about the methods discussed in this webinar, and they sound awfully hacky and restrictive, and potentially confusing to the report reader.
Method 1: Filter on count%2
The expectation to any normal reader would be to read down the column, then move to the next column and read down that column, etc. The process starts over on the next page. This method instead puts data alternating between columns. Row 1 on left, row 2 on right, etc. This does not follow the standard reading pattern.
The other issue, for me, is that each row is really another table, with an unknown number of items within it. Alternating these tables as such could cause the data in the left side to be really really long, but the data on the right side be really short. It all comes down to the luck of the data.
Method 2: Filter on count>X
This method is better for the reader, but is only useful for fixed/known data sets. In my case, I don't have a fixed dataset. Furthermore, as with the previous method, the physical length of the data is unknown, the data in the tables would be lopsided. Since I cannot control the page breaks, data may flow down multiple sheets of paper before moving to the other column.
What it's sounding like is that BIRT is not capable of properly flowing data over columns. Researching this topic on the internet has turned up complaints (going back to 2006) of this feature not being implemented, even though the documentation, API, and the fields required to make it work in the designers all exist.
mwilliams
kaiserfro,
Column wrapping is a feature that is being implemented for a future release of BIRT. It is not yet in there though. Using a grid, multiple tables, and filters (The webinar example was just one example of a filter. Other methods can be used to get the data to read across the page as you described) is the only way to do this besides going into the code and creating the feature yourself. What do you mean by a fixed dataSet? The described approach will work for any length of dataSet. Uneven height on rows is the only thing that has the potential to cause issues, if this is what you mean.
actuser9
Hi BIRT Guru,
This seems to be a two year old post, but any idea of when the columnar style feature is going to be implemented in BIRT?
Also, is there a way to get the newspaper style reporting can be worked out when there is grouping involved in it. Each group has data with multiple paragraphs and the first column data should be continuing to the second column.
Any pointers would be highly appreciated. Awaiting your inputs.
Regards
UY
mwilliams
Unfortunately the feature isn't slated for a specific version, yet. They keep running into issues with it and pushing it back. Here is the bug posting. You can vote for it and encourage others to vote for it to put a higher priority on it:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=133218
As for a way to wrap your text. I've done this by creating a scripted dataSet using my current data as the source, splitting the long data into row sized chunks so I could make it wrap correctly from column to column without having any bad spacing issues.
actuser9
Sure, I would vote for the bug, our project is hanging there due to this.
Can you please attach the design file that has the scripted data set to split the long data into multiple columns?
Also, the report that needs to have this multi column design has been defined with multiple groups. Is the newspaper style design still possible with muliple groups and the data can flow into multiple pages.
Thanks
UY
mwilliams
What is your BIRT version? I don't know if I'll be able to find the report or not. If I don't, I'll try to make a new example in your version. Let me know.
mwilliams
I found the example, but it's in Actuate BIRT 11, so you might not be able to run it. It should be easy enough to recreate in your version though, so just let me know that and I'll do it. There's no grouping, but that should be doable as well. Just make sure your original dataSet is sorted by the field you're going to group on.
actuser9
Version is Actuate 11 SP3. Please attach the report.
One another question, for each header under a group,considering a huge chunk of text(single paragrah), is it possible to wrap it into two columns and then continue it on the second page and so on?
mwilliams
Ok. Here it is. This example has two different options. The first table is hidden because it's not a realistic option. It puts 7 words per line. The catch is that all the words are the same length "long text long text...". The second option figures which words go in each row based on the length of the words. You can see this script in the scripted dataSet. This example uses only one very long text, but multiple long texts shouldn't be much different. For the long text header, you should be able to split that into multiple rows and just include it in your scripted dataSet in proper order. You could then avoid having to use actual grouping, because you'd have handles all of that already, with your sort in your original dataSet. Hope this helps. Let me know if you have questions.
actuser9
Thanks a ton Michael for the quick turn around. I will have to see how I can implement into the report I have with groups in place.
Regards
UY
mwilliams
Not a problem. Let me know if you run into issues.
actuser9
Hi Micheal,
I tried this out and works fine when there are no groups involved.
Is it possible to tweak the code to get this work when groups exist and each group has 2 or more rows of long text in it?
Thanks
UY
mwilliams
Take a look at this report. There's a little bit more scripting, but not much. You could make it even better by handling the table group rows in your scripted dataSet, as well. Hope this helps.
actuser9
Michael,
That was brilliant. Hatsoff to your brains.
Only thing I noticed when running the attached report is that the text in those lines are not getting justified, but were left, center, right aligned. Any idea why?
I will keep you posted if I run into any other issues.
Thanks
UY
mwilliams
I would guess it's not justified, now, because it's only a single line of text. I don't think justification works when there is only one row. If you think about when you use justification, I'm pretty sure the last row is always normal. It doesn't get justified. So, now there are several hundred "last rows". Guess that could be the downfall to this idea.
If I think of something, I'll post it.
actuser9
My thoughts were too along the similar lines that this could be the downfall but it is the client call to choose to have newspaper style with unjustified. Thank you.
Regards
UY
mwilliams
You're welcome!
actuser9
Michael,
One issue that I came across with the report. When the group name has to be the last row, this issue pops up. The group name used in the next page is being shown. In the report that you provided, please notice that "Motorcycles" group is being populated in the last row of page 4 which is not correct.
Is there a way to get rid of this group name? I tried several ways with no luck.
Thanks,
UY
mwilliams
Making the group header value a part of your array that you separate into rows would alleviate this issue. This would take the table grouping out of the equation and the grouping would be handled within your scripted dataSet. That's one option. I'll take a look at the report at what you're talking about and see if I can fix it!
actuser9
Sure Michael, Thanks. I will try to see if I can implement what you suggested.
Regards
UY
mwilliams
If you don't want to deal with that. Here's the quick solution. Set the page break interval of both tables to 0 and handle the page breaking manually. Take a look at the attached report. Specifically the page break intervals of the tables and the script in the onCreate of each table's detail row.
The other suggestion will make your report appear "more perfect" because you won't have any uneven columns.
actuser9
That worked great!!!
What can I say...I was thinking in the similar lines you suggested of taking out the group, but no way I can think of this what you have suggested. Brillant. Thanks so much.
Regards
UY
mwilliams
You're welcome!
actuser9
Hi Michael,
Still trying to understand why the Oncreate script worked and not the page break option set for 40.
Why was the group name populating? Just trying to know the way birt works...
Thanks
UY
mwilliams
Just a bug. Probably something with the fact that the page break interval deals with detail rows, so when a group header is the next row, it's not taking that into account. It's waiting for the next detail row to place the page break. I would assume that this is fixed in the next release, but I didn't check it, yet.
actuser9
Sure, thanks Mike. All that makes sense to me now.
So, in this case, as we know, the left center and right alignment is working and not the justified. I will try if I will have luck with the scripting
Regards,
UY
mwilliams
Yeah. You'll never get justified to work this way, because of it only being one line. You could possibly write your own line spacing algorithm to make this happen, more like you're wanting. The other option, that could work for you, would be to separate your scripted dataSet rows into "pages" rather than single lines. So, you'd have 40 of the current lines go into a single dataSetRow. The long text would then allow your justification to work. You might give that a try, if you find some time.
actuser9
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="108222" data-time="1344287633" data-date="06 August 2012 - 02:13 PM"><p>
Yeah. You'll never get justified to work this way, because of it only being one line. You could possibly write your own line spacing algorithm to make this happen, more like you're wanting. The other option, that could work for you, would be to separate your scripted dataSet rows into "pages" rather than single lines. So, you'd have 40 of the current lines go into a single dataSetRow. The long text would then allow your justification to work. You might give that a try, if you find some time.<br /></p></blockquote>
<br />
hmm...would like to definetely give it a try...
mwilliams
Let me know if you get it to work!