How to auto center the table after hiding few columns in jasper report - jasper-reports

I have been hiding my columns in the table based on the columns I want to hide by passing parameters boolean value to false. It is all working fine, but the problem is when I hide the columns the whole table look likes it has moved to the left and it appears even more weird when I try hide 3 or more columns. I some how need to figure it out and bring the table to the center of the containner after hiding the columns that needs to be hidden. I not able to find any properties to make this change in jaspersoft. Please help me do this.
MY TABLE WITHOUT HIDING
AFTER HIDING THE COLUMNS
How could I make my table center align to the container of that respective band

Related

TPPDF - table cell at bottom of page cut off

This is my first question on stackoverflow so forgive me if I'm missing anything.
I'm having a problem with a table cell being cut off at the bottom of the page when using the TPPDF cocoapod in a swift 4 app for i-pad. Only part of the cell shows with no text
I'm creating a series of tables in my document. Because the column widths are variable I'm adding a new table for each row.
Is there a way to either prevent this from happening or to determine when to add a page break?

Can a child text box grow with parent rectangle in SSRS

I have a rectangle with 2 subreports in it. I am trying to have a "header" text box to the left of the two reports that grows with the rectangle so that the "header" stays centered with the content. Current Arrangement
Desired Arrangement
I'm not sure how you have constructed the table/rectangles but this should work...
There is almost certainly a better way of doing this but this does work...
First insert a table. Delete the last two columns so you only have a single column left.
Then Delete the header row, you'll have a single cell remaining.
Now go to the Row Groups at the bottom of the screen, click the drop down and choose, "Add Group" --> "Parent Group".
In the dialogue, type 1 in the Group by field (this is just a dummy value) and select "Add group header". Click OK.
Optionally, you can right-click the details group and delete it. Select Delete Group Only when prompted.
Now the left column is merged so you can put your header text in there and set Vertical Align to "Middle". Add you sub reports as required and it will always be centred. Sere's some examples with different sized sub reports.
and finally with the text rotated which if your header is short and be formatted in a large enough font, sometimes looks better.
I left the ugly border in place so you can see the positioning more clearly.
Create a table with two cells. Your header cell on the left and a blank cell on the right. Then create a second table with your data. Drag and drop it into the blank cell.
The grouping in the parent cell will apply to the child cell in the table. The parent table's dataset will override a different dataset in the child table (which I doubt will cause any concern for you).
To make it look right you will want to remove the outside borders of the child table.

Y position while composing a PdfPTable

I'm building a pdfptable thru ItextSharp, but I need to know, while I'm adding cells, my Y position in the page. Cells have a variable height.
I need to know it to avoid tu put a new 'Breaking title' in the table if this would go on the last table row, as it should go on a new page (on cust request).
I tried writer.getverticalPosition() but it seems not reliable in composing a table.
Is there a way to know it ?
There's a contradiction in your question. Let me explain what doesn't make sense.
You create a PdfPTable, let say you have an object named table. when you add cells to table, the object grows. Plenty of data is stored into memory.
Now you say: I want to know the Y position of the rows on the page while I'm adding cells.
Which page? There may not even be a page? As long as you build the table object, there is no page, there are no Y positions. One table could be 200pt heigh when added to a page with a width of 400pt. The same table could be 400pt heigh when added to a page with a width of 200pt. It isn't until you add the table object to a Document that the table gets its shape.
If you want to make sure a "title" isn't the last row on a page, you should break up your table in smaller parts. Create a subtable and add it to the document. Now use getVerticalPosition() and check how much space is left. If there isn't sufficient space for the first X rows of the next subtable, move to a newPage() and add the next table there, otherwise add the table on the current page.
If you define the widths correctly, nobody will see that you've been adding more than one table: it will look as if you added one large table instead of different small ones. If you don't know how to calculate the height of the rows in the subtables, please note that you need to define the total width of the table and lock the widths. For the reason explaiined above, no software can calculate the height of a table if it doesn't have any info about its width.

How to make a specific column be moving in the SWT table in Eclipse RCP?

I have created a SWT table with 23 columns in the Eclipse RCP. The table has only Horizontal Scroll Bar. In runtime, it is obvious that the columns to the left get obstructed when we scroll to Rightward and vice-versa because our view (window) can not display all columns at once. But, I want one of the columns(say col. 2) at Left of the Table to be movable, so that it should be floating at very Left of the table when I scroll the table data Rightward at runtime.
I've tried by setting the col. property movable like :
tblData.getColumn(1).setMoveable(true);
But, it can only make the col.2 be moved (by dragging withing table header). But I wish the column be floating on the table while scrolling (to rightwards/Leftwards) other data in table.
Please, suggest me how to do this.
There is no really cool way of achieving what you want using Table. But there is an official Snippet showing how to emulate something similar here.
If you don't mind using an SWT table implementation which is not natively drawn, apparently NatTable supports "Frozen columns".
Also one of Nebula's custom table implementations might be capable to do what you want. There's Grid and XViewer.

Merging Cells Vertically in SQL Reporting 2008

In SQL Reporting 2008, Is there a way to merge multiple cells that are adjacent to each other along a vertical column?
In the report designer, click on your table, then at the bottom of the screen there is a window spit in two with the headings "Row Groups" and "Column Groups". In row groups, click on the little down arrow next to the default group "table1_Details_Group" and choose to add a parent group. Select the field you want to group on, and don't check the boxes to add a row header or footer. A new column will be added and when you preview you will see that the cells of this column are merged vertically.
You cannot merge cells vertically, only horizontally.
You can, however, create table groups. Grouped data inside a table can be designed to look like merged vertical cells.
EDIT
INFORMATION ON MATRIX CONTROL
You may use matrix table to do it. It force you to have a group column, however you can just set the group column visibility as Hidden. Then add new columns you needed.
see image here: ( my Month is merge cells from two rows)
http://i.stack.imgur.com/WA2ZL.png