Jasper report excel cutting off cell - jasper-reports

I want to export to excel, but I want the data to print in a cell irregardless of how much data it is. I have tried setting the "Stretch with Overflow" option and that appears to work, but it creates empty rows between actual data rows. I tried adding the IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS to true and it does not resolve my issue. I am also using IS_IGNORE_PAGINATION.
Ideally I want excel exports to just put all the data in a cell independent of the size of the cell.

I found the answer. You need to set the net.sf.jasperreports.print.keep.full.text report parameter to true

#DMoses: I had the problem of the empty rows a lot using the "Stretch with Overflow" and it was generated because I left unconsciously a space between the cell where I display the data and the margin of the report. Just put the cell at the edge of the margin and then you won't have that problem.

Related

How to edit rowSpan of cell of report in BIRT?

I created a report (.rptdesign) in eclipse/BIRT and added a Grid and some rows in it. I want to change the rowSpan of 1st cell in 1st row to 3. But in properties window, the property is 1:inherited and won't allow me to edit the value. I tried different combinations of width and height (in, %..) and other properties but can't figure out this behavior.
I spent hours and there is barely any resource available online or on official site. Any help is appreciated. Thanks.
when you create a grid with rows- all cells are equal in width. Now what you can do is merge the cells together that will create the rowspan/colspan like this -
Please click on image to see steps
After merging it will look like this -
You can get more information here : eclipse help
You just mark several cells in the layout editor, then "merge cells" in the context menu. To split a block of merged cells again, use "split cells" in the context menu.

How can I style a cell or row/column of cells in NatTable programatically?

I'm having a hard time figuring out how to individually style a cell or group of cells when a certain thing happens. For instance I would like to be able to right-click on a cell and hit something like "tag" and it would change the background color of the cell to something different. I would like to do the same thing with rows, columns, or any random group of selected cells. I also need this change in style to persist even if the cell(s) are moved beyond the viewport layer's view.
If you have a hard time with NatTable, maybe it is worth reading some of our tutorials and documents.
https://www.eclipse.org/nattable/documentation.php?page=styling
http://www.vogella.com/tutorials/NatTable/article.html
In short related to your question. Individual styling is done via config labels on a cell and styles that are registered in the ConfigRegistry for that label. So what you need to do is to implement some sort of label registry based on cell indeces. That label registry then needs to be used by a custom ConfigLabelAccumulator so the labels are attached to the cells with the corresponding indeces.
We have a basic implementation on a column base via the ColumnStyleEditorDialog. This can be seen in the _000_Styled_grid example by clicking on the column header and call "Format cells". Personally I think that feature is not complete, but it should help you in seeing how it works in principle.

How to stretch text field on multiple pages in Jasper Reports?

Scenario:
I have a jasper report with multiple text fields inside a detail band. Each text field has the properties:
Position: Float
Stretch Type: Relative to tallest object
Print When Detail Overflows: False
Stretch With Overflow: True
The details band has the property:
SplitType: Stretch
Current Result:
When one of the text fields is taller than the page and extends to a next page, all other text fields stretch to the end of the page.
Problem:
I want all text fields to be able to stretch on the next page as well. If I use the property 'Print When Detail Overflows: True' then this causes the text fields to be 'reprinted' with data duplicated. That is not my intention. I want to be able to stretch the text field to more than one page.
Thank you!
I also have same problem and after playing whole day did not figure out anything :-(.
My workaround was to set whole band to "Prevent" split type. It is not solution. Only trying to not have text fields 'reprinted' with data duplicated.
You can try setting to the field's Stretch Type to Relative to Band Height. If that didn't work, just play with those properties. I believe you can accomplish it by playing with the properties you mentioned.

iReport: how to hard fix a detail band's height, independent of it's content

I use iReport and I try to fix a detail band's height independently of its content. My problem is that if one of my text fields has more than one line, the band "grows" and because of this I get a second page.
So is there any possibility to hard fix the height of a detail band?
Try setting the stretch type for the text field to "No Stretch" and the split type (see the properties menu) for the detail band to "Prevent".
Since we could not find any direct options, We are doing this in an indirect method, having PLSQL Procedure for data fetching, different sub-datasets are used for filling fixed height detail areas, so each fixed datasets are filled with max.rows which it can accomodate (within sub procedures). Hope it helps someone.

Problem with conditionally hiding rows of a grid in generated PDF reports

I am generating PDF/HTML report from a BIRT template.
I am using "visibility" property to hide a grid row conditionally. It is working fine and that row is hidden in generated report.
But, I am getting a bottom border missing from the upper grid row in my PDF report and although HTML report is generated perfectly fine.
To understand it see below, for example my report looks like following when visibility is 'true' for row containing location element.
Name
Description
Location
verdict
and after visibility is 'false' for 'Location' row, it is showing as following in generated report.
Name
Description
verdict
The grid line between Description and verdict is missing.
I am using BIRT 2.1.2. Is this a known problem in this version?
Please help.
How are you implementing the separator line? Are you just creating a border around the grid cell? That entire cell/row is getting suppressed along with the border.
To get the effect you want, try applying your visibility rule to the data (text) item itself rather than the Grid element. You could also add a horzzontal rule to the end of each of the text elements to insert a divider that would not be affected by the grid's visibiltiy.