I am new to iText and am trying to figure something out and ANY help would be greatly appreciated.
I would like to generate a table that has n columns that should they not fit on one page, then have the remaining columns continue on the second page and so on.
Is there any way to do this with iText?
Thanks,
Kirk
When you create a table, you ALWAYS know the width of the table, be it because you've defined the absolute width(s of the columns) yourself, or because you know the available width on the page in combination with the width percentage of the table.
Now it's up to you to distribute the columns over different pages. You can do this with the writeSelectedRows() method as shown in this example from my book.
Of course: it's more difficult than that simple example, as you'll also want to make sure the rows fit the height of the page, but that's another question.
Related
I'm having problem with items alignment in universal theme 42.
Please look into the picture below,
All of the shown page-items are having label column span = 1.
Please help me to solve this problem.
The grid is based on 12 columns. You have to use the grid as Bootstrap principle.
https://getbootstrap.com/docs/4.5/layout/grid/
It means that you can't overcome 12 columns for each row.
In the image that you uploaded in this post I would use 4 columns each item or less depends of the size.
Let me know if you have more questions.
Currently I'm working over a birt report with a table to display data. Now, i want to convert the same thing to grid, which provides better viewing and analysing capability. So, is there any easy way (in editing the XML or something) to convert the whole table to grid? Meanwhile, the complete data remains the same.
NB: I havn't yet used a bit with grid, never ever! Also m bit newbie to birt. So pardon me if I'm spiting out anything rubbish.
A table is a different element from a grid. There is not a button to push that will convert one to the other. You would need to add a grid element to your report and set it up like you want it to look.
I seriously doubt you want to do this though. a grid will only display the first record returned, unlike a table that will display all the records returned.
A related, but more reasonable question is how to convert a single-column table to a list or vice-versa.
I often need this table-to-list conversion for optimizing master-detail reports for (our customized version of) the WordEmitter, because this prevents superfluous nested tables in the Word output.
Fortunately, for tables without grouping this is relatively easy by editing the XML:
Change the corresponding opening and closing tag to a tag, remove the elements and the elements (but keep theirs contents).
Apart from that, James' is right: There is no reason to convert a table to a grid item, mainly because a table will display all records (while a grid displays only the first) while the table has all features of a grid (and more, like grouping).
I have a requirement to display a single jqgrid into several lines (2 or 3). The user does not want to use the grid horizontal scroll bar and would like to see several data at once.
Anybody with an idea how to do this?
If I understand your question correctly you want to wrap rows in the grid because the grid have large number or rows. It's not possible because jqGrid are base on HTML <table> and the row (<tr>) of table can't be wrapped.
If you have grid with columns which text is long you can consider wrapping inside of cells of grid. See the answer, this one, this one and the answer too.
I have the problem, that my program is too slow in displaying a flexTable. I've searched how to display the table faster and I think with a cell table it might be faster. The problem now is, there are different objects displayed in the table and I don't know how to do that with a celltable. I have a list<DTOEmployeeWithTask> and each dTOEmployeeWithTask has a list<TaskRelation>. First there's displayed a row with the employee and then each taskRelation for the employee, like this:
Now to my questions: what is the fastest way to display such a table? If it's with a cellTable, how would I do that in a CellTable?
If you need some code just say what you need.
FlexTable is a no go anyway as it's known to be slow. What would be a good solution is a Custom DataGrid, which can display rows with sub rows as in your screenshot. The GWT showcase page has a nice example including source code which should help you further: http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwCustomDataGrid
I need to change the orientation of a table in a BIRT report so that the table header is vertical instead of horizontal.
Is this possible? I don't want to use a Crosstab.
It seems this thread is still being pointed at so I posted an example of a horizontal table layout using a crosstab. I know it won't help the original author but others following this thread now may find this helpful.
To create the horizontal grouping, first create your query like normal, then create a Data Cube. In this data cube, drag each field that you want into a group. Then drag a new crosstab on the report and drag each field into the top right column group area. It will create a new header row for each field. Don't put anything in the left side (Rows) and don't put anything in the measure field (bottom-right). This will create labels on the left... and the data will extend out to the right.
The report design example can be downloaded from: http://developer.actuate.com/community/forum/index.php?/files/file/1079-horizontal-table-using-crosstab/
Virgil
If you want dataset records to be reported across the page, this would have to be done via a crosstab.
If you want dataset records to be reported down the page, this can't be done automatically as far as I know. However, it can be done by inserting a new detail line in your report table object for each database field to be reported, then moving column headings from the heading row into the first column's detail rows and moving record values into the second column's detail rows.
So, for example, a report with 6 columns in it would become a two column report with six detail rows.
Not in box (up to 3.7). You have to use 3'd party libs like that one.