Home
Analytics
BIRT 2.3.2 and Dual Column Listing Report
ikerarbizu
Hello everyone,
Hi have a sentence like this:
"select ID from FILES where FILES.FILE_TYPE='Photo'"
so I get a table this way:
ID
100
101
200
394
...
I need to show it in a table with 2 columns and 3 rows (no matter if it has more than 6 results, I only need the first 6 of them).
I have tried with the template but when I try with the "preview" option I get the rows this way:
ID ID
100 100
101 101
200 200
394 294
... ...
insted of what I need, that is:
ID ID
100 394
101 ...
200
or (even better):
ID ID
100 101
200 394
...
(I don?t need the headers, so the "ID" on the top of the tables is not important for the layout and all that things)
I really need a "step by step" explanation or a tutorial, becouse I can?t understand how the dual column works, and I have to make this report.
Thanks a lot!!!
Find more posts tagged with
Comments
mwilliams
You should be able to set the limit to how many records you want to return in your query. You can also do it within BIRT if you'd like under the settings in the dataSet editor or by using a filter on your table. Also in the dataSet editor, go to computed columns and add a computed column that uses the aggregation "runningcount". In your layout, you'll put a grid with 2 columns and 1 row. You'll put the same table in both cells of the grid. Then, in each table, you'll make a filter based on the computed column you made. In the left table, you'll put row["computedColumn"]%2 equal to 1. For the right table, you'll put the filter for row["computedColumn"]%2 equal to 0. If you haven't limited your results in your dataSet, you'll also want to add a filter in each table to limit the results to the first 6, with row["computedColumn"] less than or equal to 6. It should now do what you want. Let me know if you have questions.
ikerarbizu
IT WORKS!!! GREAT!!!
I have put the "row[computedColumn]%2" and it worked fine.
I see the result this way:
ID ID
1 2
3 4
5 ...
Thanks a lot!!!!
mwilliams
Great! Glad to help. Let us know whenever you have questions!
rajani_interwove
Hi
I need to display my listing report like :
1 6
2 7
3 8
4 9
5 10
Could you please help me how can I do this.
Thanks in advance.
Regards,
Rajani
Hans_vd
Hi Rajani,
Where do these numbers come from?
Is there any logic that needs to be respected?
Is it always the numbers from 1 to 10?
rajani_interwove
Hi,
Its not exactly the numbers 1-10. Actually I need to diaplay the address labels. In the first page, I need to display the first ten rows of the database, in the 1st column and next ten rows in the 2nd column and the same for all the pages.
I have just given sample like :
1 2
3 4
5 6
7 8
9 10
Hope this helps.
Regards,
Rajani
mwilliams
There's an example in this devShare post that shows how you can create a newspaper style layout with a grid, duplicate tables, and a filter. Hope this helps.
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1346-eclipsecon-2011-hands-on-tips-from-the-birt-forums-examples/
jain
Hi, I want to develop newspaper style layout report, thing is the field has long paragraph with section headers. so I need to display the paragraph with section headers like top-bottom and left-right in a page and then move on to next page. I have implemented the logic in the report which is available in the link, but the content is not flowing properly. I am attaching the sample report for refeence. could anyone share your ideas?
mwilliams
It was just a space issue. When you don't have enough room on the page for the page break settings and filter values set up, it'll mess up the page breaking. This is a fixed example, moving the rows per column to 30. I also manually page break each column because there was an issue in one of the last pages that was allowing an extra row in, messing up the spacing.
jain
Thanks Michael, I have implemented the same logic what you provided in the report thing is I am displaying the long description in a row, but the report display as word by word on each row. I want to know how you splitting up the long description and displaying the words as sentence in a row?
for example: Description: "The long description is getting displayed as"
The
long
description
is
getting
displayed
as
mwilliams
Check the scripted dataSet. There is script in there that takes the individual words and makes rows out of them. The row lengths are limited to a certain number of characters, which is set in the script. In the example, I believe it was something like 28. Take a look at this and let me know if you have questions.
jain
Thanks Micheal, I have looked in to the script and also implemented the same logic in my report, now I can get the 2 words in a row thing is the textbox length is wider and the value is getting dispalyed only 2 words in a row. I have tried with many values to increase the character size but its not getting increased. Could you please explain more about the script to increase the row length.
jain
I misunderstood the logic what you have provided, now have implemented the same logic in my report and the content is flowing properly. Thanks a lot Michael.
jain
Hi I am facing a problem in designing the dual column part, I have designed the report in following way,
1. Inserted a grid with 1 column 1 row
2. Inside the grid, added a table with 2 columns and grouped with one common element
3. Inside the table, in the first column inserted a table and grouped with some element to display first 20 rows of description
and in second column, inserted a table and grouped with same element to display another 20 rows of description, so that the description should display from top-bottom and left-right in a page.
But the result displays as, first 20 rows of description display at left side of the first page and another 20 rows of description displays at right side of second page. I tried in many ways but its failing, could anyone suggest me on how to design the report? and its very urgent requirement.
Tubal
Do you have a page break in your group?
jain
Thanks for your response Tubal, yes I have pagebreak in the group. I am not sure the way have designed is correct. could you please share your ideas on this?
Tubal
If you've got a page break on the group in your left side table it will page break as soon as it his a new group. You might try only having a page break on the right side table if both tables will always hold 20 rows anyway.
jain
Thanks Tubal, have tried the grouping part with page break options and its working, but problem is the content is not fitting in a page its not flowing with two columns properly, 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