Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Multi column report
robbertv
I'm running the latest version of BIRT (3.7.1). I've been trying to set up a multi-column report, but I cannot figure out how to do it. I've set the columns property on my master page to 2, but when viewing the report, I only see only column. I see that this version of BIRT is supposed to support columns. What do I need to do?
Find more posts tagged with
Comments
Hans_vd
Hi Robbertv,<br />
<br />
I never heard of that property before. I tried it, but it didn't work as you stated.<br />
<br />
you can create a multicolumn report by using a crosstab. Read more about it in <a class='bbc_url' href='
http://enterprisesmartapps.wordpress.com/2012/01/06/creating-a-multi-column-birt-report/'>this
blogpost</a><br />
<br />
Hope this helps<br />
Hans
mwilliams
This feature is not yet supported. It was scheduled to be in 2.6, I believe, but it was not ready and they want to have it working right before adding it, just to add it. For a workaround, you can use a multi-column grid, two separate, but duplicate, tables, and then use filters to limit the data in each table to appear to be a "newspaper style" report.
Here's a devShare post that contains an example showing how to get a newspaper layout.
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1346-eclipsecon-2011-hands-on-tips-from-the-birt-forums-examples/
Hope this helps.
jain
Hi Micheal,
I have tried the newspaper style report using a Grid with two 2 columns and added tables in a column and bound with same dataset, also used filters to limit the data.
I am expecting the result something like below; Id is grouped and section Id's are grouped under the ID. The content should flow based on section ID. Could you please help me out on how to design the report,
Column 1 | |Column 2
ID: 1 | | ID: 1
Section 1: | | Section 4:
long description long description long description long description
long description long description long description long description
long description long description long description long description
long description long description long description long description
long description long description long description long description
Section 2: | | Section 5:
long description long description long description long description
long description long description long description long description
long description long description long description long description
long description long description
long description long description
long description long description
long description long description
long description long description
Section 3:|
long description long description
long description long description
long description long description
long description long description
long description long description
jain
Is any updates?
mwilliams
Is the above how you'd like your columns to be? Where a value's long description ends at the end of a column and the next is started on the next column? Or will some long descriptions wrap across columns? Let me know. Also, let me know your BIRT version.
jain
Hi Michael, I am using BIRT 3.7 to develop newspaper style report, I have done the following logic in the report, 1. Added two tables in a Grid
2. Bound the tables with same dataset,
3. Grouped the table with ID as well as section ID
4. Set the pagebreak interval to 25 rows in each table
5. Added filters to the table something like "row["rowNum"]%50 Between 1 and 25" for the first table
6. "row["rowNum"]%50 NotBetween 1 and 25" for second table.
now the content flows based on the pagebreak count. I am facing with some two issues:
Issue 1. If section's content is flowing from column 1 to column 2, then the section headers should not repeat on the column 2, please check the below result for more detail
PAGE:1
Column 1 Column 2
ID: 1
Section 1: Section 3:
long description long description
long description long description
long description long description
long description long description
Section 2: Section 4:
long description long description
long description long description
long description long description
long description long description
long description long description
long description long description
long description Section 5:
long description long description
long description long description
long description long description
long description long description
long description long description
Section 3: long description
long description long description
long description long description
long description long description
long description long description
Issue 2: I am not including the section headers row count, if content in the left side exceeds the pagebreak interval(25 rows), then remaining sections content is moved to next page left side. please check the below result for more detail,
PAGE:2
Column 1 Column 2
ID: 2
Section 1: Section 5:
long description long description
Section 2: long description
long description long description
long description long description
long description long description
Section 3:
long description
long description
long description
long description
long description
Section 4:
long description
long description
long description
long description
PAGE 3:
Section 4:
long description
long description
long description
long description
jain
Hi Michael, I am using BIRT 3.7 to develop newspaper style report, I have done the following logic in the report, 1. Added two tables in a Grid
2. Bound the tables with same dataset,
3. Grouped the table with ID as well as section ID
4. Set the pagebreak interval to 25 rows in each table
5. Added filters to the table something like "row["rowNum"]%50 Between 1 and 25" for the first table
6. "row["rowNum"]%50 NotBetween 1 and 25" for second table.
now the content flows based on the pagebreak count. I am facing with two issues: Please find the attached excel sheet for more detail,
mwilliams
Have you seen this thread. I posted an example showing a way to wrap grouped text with long texts.
http://www.birt-exchange.org/org/forum/index.php/topic/20288-flow-report-content-across-multiple-page-columns/
jain
yes I have seen the thread and used the same logic in my report, used the filter for tables using rownum.
rownum is nothing but the content count, have not included the section headers count in the rownum. I am facing a problem in that I am adding section headers and its content in the layout, but its not taking the count of section headers, because of that I cant able to make the proper page break interval.
Example:
Section header1:(headers added in Group header row)
some content
some content
some content
Section header2:
some content
some content
Section header3:
some content
some content
some content
some content
I want rownum count as 12, but currently its taking only the content count, I am getting rownum count as 9. So how to get the total row count of section headers and its content?
mwilliams
Okay. If you want to have the section headers as rows and count them, you could just add them into your scripted dataSet. This would allow you to avoid the grouping because you'd have already done the section headers. If I'm misunderstanding, let me know.
jain
In the report have added separate field for section headers and Description in the scripted dataset, and splitted the description using space to get the row count. In the design layout I am displaying the description in the detail row and section headers in the group headers row, now I am getting the count for only description, but how do I get the count for both section headers as well as description?
mwilliams
Can you create a design that I can run showing what you did and attach it. Thanks.
jain
Hi Michael,
Please find the attached report design file, I have used the same logic what you provided in the link for row count in my report, in the layout have added product line(section headers) in group header row and content in the detail row, I want the row count for both section header and content. The reason why am asking is without knowing the row count I cant able to set the page break interval in column1 and column2.
mwilliams
I modified the script to include the ProductLine as a row in the details. This way, the table doesn't have to be grouped, allowing you to count the "header" row.
jain
You are really great, this is what I have expected. Thanks a lot Micheal and I will keep posting if I have any issues.
jain
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="115914" data-time="1365621511" data-date="10 April 2013 - 12:18 PM"><p>
I modified the script to include the ProductLine as a row in the details. This way, the table doesn't have to be grouped, allowing you to count the "header" row.<br /></p></blockquote>
Michael,<br />
<br />
One issue, when the group name has to be the last row, the group name should move to next column/next page of first row In report some times the group name is being populated in the last row which I need to remove and move to next column/next page.<br />
Is it possible to get rid of this group name? <br />
<br />
Thanks,<br />
Jain
mwilliams
In your scripted dataset you could handle this by checking if the header value is at a value which would be the end of the column and insert a blank row instead, if it is. The would be based off of the value you use for your filters and page break interval.
jain
Thanks Michael, It would be better if you could provide some script/ sample.
mwilliams
I'll see if I can explain better, first. Say you allow 35 rows per column. In the example above, I insert a row for the product line. To insert a blank row, you'd just do a check to see if row["runningCountField"]%35 was equal to 0 when adding the product line value. If it was, you'd output a blank line instead and wait til the next row to place the product line group value. Hope this helps. If not, I'll modify the above report.
jain
Thanks Michael, I have tried using row["runningCountField"]%35 equal to 0 in a script but for all last row the blank line is inserting, how do I make it only for group name? Also the pagebreak interval will vary according to the data, sometimes its 35/30/36 like that so how do I get it work?
mwilliams
You'll need to do the check for the 35th or 30th or whatever line ONLY when you're adding the group row. You'll see in the script where this is done. As for the change on row count. You'll likely have a parameter or script that figures this out, right? So, you'd be able to use that value to determine the value you use in your insert a blank line or not script.
Does the report above show the issue of the group name being the last value in a column? If so, I can modify the example to show you. Let me know.
jain
Micheal, the above report doent have this scenario, I have used in the report something like below, but its not checking for current Product line. that is the probelm I am facing
if(row["rowNum"]%29 == 0 && (row["ProductLine"] == currentPL)){
temp = "";
}
mwilliams
In the above report, if the scenario occurred, it'd be resolved how you're wanting by changing:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
else{
row["ProductDescription"] = row["ProductLine"];
currentPL = row["ProductLine"];
}
</pre>
<br />
to<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
else{
if(rowNum%40 == 0){
row["ProductDescription"] = "";
}
else{
row["ProductDescription"] = row["ProductLine"];
currentPL = row["ProductLine"];
}
}
</pre>
jain
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="115914" data-time="1365621511" data-date="10 April 2013 - 12:18 PM"><p>
I modified the script to include the ProductLine as a row in the details. This way, the table doesn't have to be grouped, allowing you to count the "header" row.<br /></p></blockquote>
<br />
Hi Michael, one issue the spacing between paragraphs is not happening for the following para, <br />
<br />
some contents with paragraphs some contents with paragraphs some contents with paragraphs <br />
some contents with paragraphs some contents with paragraphs some contents with paragraphs <br />
some contents with paragraphs some contents with paragraphs some contents with paragraphs <br />
<br />
some contents with paragraphs some contents with paragraphs some contents with paragraphs <br />
some contents with paragraphssome contents with paragraphs some contents with paragraphs <br />
some contents with paragraphssome contents with paragraphssome contents with paragraphs <br />
<br />
I have used '\n' to make a blank line in between para, but its not happening, I need spacing between para, how do I get it work?
jain
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="116401" data-time="1367393664" data-date="01 May 2013 - 12:34 AM"><p>
In the above report, if the scenario occurred, it'd be resolved how you're wanting by changing:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
else{
row["ProductDescription"] = row["ProductLine"];
currentPL = row["ProductLine"];
}
</pre>
<br />
to<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
else{
if(rowNum%40 == 0){
row["ProductDescription"] = "";
}
else{
row["ProductDescription"] = row["ProductLine"];
currentPL = row["ProductLine"];
}
}
</pre></p></blockquote>
<br />
Let me try this out
mwilliams
Let me know.
XrQjUflt7KYjalYHhNim
<p>Hi,</p>
<p> </p>
<p>Is there a sample for Birt 3.4.2 showing how to split a data set into multiple fixed columns?</p>