challenge with column modification
Hi,
I have a requirement where I want to restrict the number of rows of customer and address into three columns
for example my data returns 10 customers and 10 address , I want to break it where I can show 4 customers in column one and two and 2 in column 3. is this possible? any help advice appreciated
Comments
-
Here is an example:
https://forums.opentext.com/forums/discussion/61121/birt-mailing-labels-example
The example uses a grid to create the columns. Each grid column contains its own table. The tables have filters so that they do not duplicate the data.
Warning No formatter is installed for the format ipb1 -
For this method, the number of columns is determined by how many grid columns and tables are manually added. The modulus operator (%) splits the data rows into the columns equally. If there are 3 columns, every third row is placed in the first column. If there are 4 columns, use %4 so that every 4th row is placed in the first column, etc. It is simple coded logic to distribute the data evenly. If you have 10 rows and want 4,4,2, you can change the filters to (the first row is 0):
column 1: row number < 4
column 2: row number > 3 && row number < 8
column 3: row number > 7Warning No formatter is installed for the format ipb0 -
thanks for your explanation Jeff,
this will work if i always have a fix number of rows, how ever lets say the max rows are 10 but (it could be less ) which I didn't think about it when I start this experiment
if max rows 10 then we want 4 - 3 - 3
if max rows 9 then 3 - 3 -3
if max rows 8 then 3 -3 -2
any script or more dynamic logic could presents this options ?
thanks0 -
@hatraatrin said:
thanks for your explanation Jeff,
this will work if i always have a fix number of rows, how ever lets say the max rows are 10 but (it could be less ) which I didn't think about it when I start this experiment
if max rows 10 then we want 4 - 3 - 3
if max rows 9 then 3 - 3 -3
if max rows 8 then 3 -3 -2
any script or more dynamic logic could presents this options ?
thanksThe mailing labels example in the link I provided does exactly what you asked. Add "fetch first 10 rows only" to the end of the query to test 10 rows.
Warning No formatter is installed for the format ipb1
Categories
- All Categories
- 107 Developer Announcements
- 53 Articles
- 105 General Questions
- 141 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 76 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 118 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management