Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Layout Content Iteratively
mg81
Hey,
I am trying to create a layout where I have a collection of data (list of student objects) which I want to display in 2 columns (see attached image) with the 3rd student displayed in the next row.
Any pointers how this can be done? While thinking on this I wondered how a particular row can be fetched or the next row?
Find more posts tagged with
Comments
thuston
Put all the odd rows in the left column and all the even in the right.<br />
<br />
First you need to get the rownumber of the DataSet rows.<br />
<p class='bbc_indent' style='margin-left: 40px;'>The best way to have a data set row number is to define a computed column (DataSetRowNum) on the data set with expression <strong class='bbc'>++r_count</strong>, with r_count defined and zeroed in the data set?s beforeOpen script.</p> <br />
<br />
To achieve the layout, I created a Grid with two columns, and set the binding to the DataSet.<br />
Then in the Left column drop a Table, set it up for your desired layout.<br />
In the Table's Filter set the Filter to BirtMath.mod(row["DataSetRowNum"],2) EqualTo 1.<br />
Finally, copy the Table (Ctrl+drag) to the Right column and adjust the filter to BirtMath.mod(row["DataSetRowNum"],2) EqualTo 0.
thuston
Another (simpler) option is to use the List Control with a Grid in the Detail.
List controls print horizontal before vertical. You just need to make sure the content within the list is set to Display: Inline.
So if you put a multi column grid in a list, set the grid's display property to Inline, and you will get the same effect.
You can then use the Grid's width and Page size to control columns and how many will print on the page.
thuston
Here are the A11 (2.6) examples for the two techniques suggested.
mg81
Thanks Thuston for the reply.
I tried the Grid in List technique on 2.5.2 but cannot get it to work. I am attaching the rptdesign file. Can you please help me point out the stupid mistake I am doing.
mg81
I tried the other option also with Grid having 2 columns each having a table/list. First of all it works when I preview the data but it also displays error at compile time data table/list don't have a data set attached.
Also, one conceptual clarification about how all this works. When I have Grid with a data set attached it only displays one row. When I put table/list(without a data set) in the Grid it displays all the rows.
Note I am using BIRT 2.5.2
Appreciate all your help!
mg81
Anybody else have faced similar problems with the below mentioned solutions?