Jump to content
We've recently updated our Privacy Statement, available here ×

Detect export format to hide/exclude a band


ibedini

Recommended Posts

Hello,

I want to hide/exclude pageHeader band when the export format is html or pdf.

I used the sintax <property name="net.sf.jasperreports.export.html.exclude.key.element"/> but this keep the pageHeader band with white space.

Is there any formula can I put in "print when expression" of pageHeader band?

I need a formula like this: if (exportFormat.equals("html") || exportFormat.equals("pdf")) false else true

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I use visualize.js. For export I use the following javascript function:

window.customExport = function(format) {
                    report.run(
                            function(){
                                report.export({
                                    outputFormat: format
                                    })
                                    .done(function (link) {
                                    window.open(link.href); // open new window to download report
                                })
                                    .fail(function(err) {
                                    alert(err);
                                });
                            }
                            )
                            .fail(function(err) {
                                alert(err);
                            });
                };

 

How can I pass a parameter like you suggested?

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...