[#11756] - Support adding empty rows in detail band, List and Table components

Category:
Patch
Priority:
Normal
Status:
Resolved
Project: Severity:
Minor
Resolution:
No Change Required
Component: Reproducibility:
N/A
Assigned to:
0

Created a Github pull request to add property to add empty rows in detail band, List Component, and Table Component. Waiting for approval to merge.

https://github.com/TIBCOSoftware/jasperreports/pull/58

v6.7
hozawa's picture
64178
Joined: Apr 24 2010 - 4:31pm
Last seen: 1 year 1 month ago

2 Comments:

#1
  • Status:New» Feedback Requested
  • Assigned:nobody» teodord

Hi,

This looks like a very special requirement. Can you give an example when this is useful?

Thanks,
Teodor

#2
  • Resolution:Open» No Change Required
  • Status:Feedback Requested» Resolved

Hi,

I think there are various ways to achieve the desired visual effect of having fixed size grids on a page, even if there are fewer records in the data source.
First of all, I don't think this feature needs to be built-into core engine itself, as it would make it un-necessarily more complicated.

One way to do this is to implement a custom data source which is aware of group breaks and thus is capable of adding a certain number of empty rows if a group breaks sooner than a specified multiplier (for example, if it breaks sooner than 10 records in the group).
I think one disadvantage of this approach is that it truly adds rows to the data source and would affect certain types of calculations such as Average.

Another approach would be to use a group footer to add empty grid rows to the page grid, if the actual details have finished sooner on the page. This is fairly easy if the grid is build with detail rows in the report.
Attached is an example of a table made of 10 rows per page, which still draws 10 rows if there are less than 10 rows per page.
Similar techniques can be used in case of grids rendered with list or table component, is just that the remaining empty rows would need to be rendered using an extra list or table.

I hope this helps.
Teodor

AttachmentSize
Binary Data myreport_1.jrxml8.03 KB
Feedback
randomness