5

I am using ireport to design jasper reports. I want to have a report that can be dynamically generated based on user input. Means columns can be added/removed based on user input.

The one solution I know is to design the report that contains all the columns, Then based on the user input, Using "Print When Expression" can hide the column, But the empty column will still be there. Is there any way to remove the columns completely without leaving empty space in ireport.

n92
  • 7,424
  • 27
  • 93
  • 129
  • 1
    You can use JasperReports API or DynamicJasper API for fully controlling the report design. In iReport you should support two sets of columns (with different width or positions). For example, if you need to show column3 - you hide the column4_1 and show column4. And if you need to hide column3 - you show column4_1 and hide the column4. – Alex K Jan 16 '12 at 10:07

1 Answers1

5

JasperDesign is used to modify the template object (JasperReport) from within the code at runtime. I guess this might fit in your case.

Also check this SO question

Community
  • 1
  • 1
Cid
  • 1,453
  • 1
  • 18
  • 37