Jump to content
  • suggest me how to use JRExporter.FILTER to hide columns(filter out).

    Assigned User teodord
    CategoryFeature request
    ReproducibilityNot Attempted
    ResolutionNo Change Required


    Iam using jasperreports-3.5.3.jar to my reports.

    To prepare jrxml template Iam using iReport 2.0.4 tool

    In pdf I want to hide some cloumns dynamically.

    As per below url I tried to use JRExporter.FILTER, but no luck.




    Can any one suggest me how to use JRExporter.FILTER to hide columns(filter out).

    I will appreciate if you provide with an example.



    Thank You,


    User Feedback

    Recommended Comments


    I tried to use following properites(filter).

    net.sf.jasperreports.export.{format} .exclude.origin.{suffix}.{arbitrary_name}

    Properties with this syntax are used by the exporters to create default exporter filter instances that filter out content based

    on element origin information. Possible values for the {format} token are pdf, html, xls, rtf, odt, csv and txt.

    The {suffix} token can be band, group or report.

    Note that the number at the end of the properties names is just an arbitrary suffix.

    The only thing that counts is that the suffix be the same for properties referring to the same filter.



    Here my pageHeader contains 6 columns,when I use above property entire row(pageHeader) is hidden that is fine but my requirement is that I need to hide 2,3 columns in the page.


    Please suggest me how can I achieve the above (hiding 2,3 columns in the page).


    It would be great if we have similar property like "IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS " for PDF,HTML as it is present in XLS.


    Thank You,


    Link to comment
    Share on other sites



    You should set the optional "key" property to the elements that you want to remove.

    Then, in the exporter, you set the FILTER exporter parameter with an instance of the




    You create this exporter filter instance and provide it with the key values of those elements you want to remove.


    However, when the elements are removed, you end up with white space gaps in the document, as the other content does not move to take up the space.


    If you want the other columns to move and take up the space, you need to vote for some other feature requests that track the creation of a pure table component in JR.




    I hope this helps.



    Link to comment
    Share on other sites

  • Create New...