[#7541] - Dynamic cell sizing in crosstabs

Feature request
Project: Severity:
Component: Reproducibility:
Assigned to:

I would like the ability to have some dynamic cell/column/row sizing options.

The attached jrxml is probably the easiest way to explain this. In the report, you can see several bands. Each one has size variations based on the number of assessments the user selects when running the report. They can select from 2 to 6 reports. It would be nice if I could do this in one band (for easier report building and maintenance).

1. I would align the crosstab left
2. Make the first column "fixed" (does NOT resize/move)
3. Make the second column dynamic to fill the width of the band or crosstab as the crosstab is filled to the right of the page

Jeff Lyons
Illuminate Education

Binary Data multipleassessmentsummary.jrxml862.2 KB
jlyons's picture
Joined: Jul 30 2015 - 10:43am
Last seen: 2 years 8 months ago


  • Assigned:nobody» teodord

Hi, Jeff

Not sure if I got this right. Are we talking about ability to have columns of different widths inside the same crosstab?

Wouldn't this issue be solved if we simply allow you to put charts in crosstab cells and the whole report would be much simplified?


  • Status:New» Assigned

Hi Teodor,

The ability to insert charts into a cross tab, table, or list would be fantastic, but this is a separate issue (although related in the example I attached).

For this, what I would like is the ability to "lock" a column so that it stays at a fixed size, while other columns are dynamically sized to fit the width of the cross tab component. So in the example report, the first column with the labels and color tabs would always be flush left and at a specified width (say, 100px). I don't want that column to get any bigger or smaller as other columns are added or removed. The other columns can be as big or small as they need to be to fill the space.

Does that make sense?



Hi, Jeff

Since we have the JRXML, let's define a little bit more precise what exactly you call first column here.
I look at the Group Footer 1 in the assessment_id group.

I see 6 charts superimposed on 6 rectangles that are labelled A, B, ... F at the top.
Are these the so-called "columns" that you are referring to?

I also see that there is another chart a little bit wider then the 6 mentioned above, but is placed under them all.

This report report band also has two crosstabs, but let's talk about the one above, which is bigger.
It seems to have some small red rectangles in its row header cell on the left. Is this row cell area that you call "the first column"?

You see, it is hard for me to understand what columns mean in your report, because in JR Lib terminology, the notion of column appears only if you are using a table component, or if you have columnCount > 1 in the report template. You don't have any of these.



Sorry if my terminology is wrong. I'm not sure how else to refer to the things that go up and down in a cross tab. I assumed that since there are "column groups" that columns would be a satisfactory term to use.

I've attached a much more simplified diagram of what I'm talking about here. I think the jrxml I included isn't clear. In the diagram you'll see the first "column" is a fixed width of 70 px. I don't want this to change. I want to make the width a fixed value. However, all other columns can vary depending on how many items the user chooses to included in the comparison. Hopefully, this is clearer.


PDF icon jss_crosstab_widths.pdf827.93 KB

Hi, Jeff

Thanks for the drawing. It is now very clear what you mean. Unfortunately, there is nothing in JR currently that would work like that. And achieving such thing is not trivial.
For example, since cells have a free form layout themselves, it would be difficult to describe how the cell content should adapt to the dynamic width of the cell.
Sure, when a cell only contains a text element, it is easy to just consider that the element should adapt to the cell size. But when the contents of the cell is complex (people can put anything inside a cell and arrange it freely), it is not obvious how things should move and resize. Which rules should apply.