Jump to content
Changes to the Jaspersoft community edition download ×

printWhenExpression - solved


wegnerk

Recommended Posts

Hi again,

 

i want to print a columnheader when it is the first page for all kind of docs and only for pdfs on the other pages.

So, i have a report with a parameter "fileformat" (string) and export it to pdf, xls and csv. But the pageheader should only be printed for pdf on all sides and for the other two formats only on the first page.

 

how should the "printWhenExpression" look like exactly?

 

thanks in advance

Post edited by: wegnerk, at: 2006/10/17 13:03

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

of course, sorry....

 

i have a parameter "fileformat" (string) and i just had to give the pageheader an own printWhenExpression:

 

Code:

<pageHeader>
<band height="83" isSplitAllowed="true" >
<printWhenExpression>
<![CDATA[boolean(!$P{Fileformat}.equals("csv"«») &&
$V{PAGE_NUMBER}.intValue()==1)]]>
</printWhenExpression>
...
</band>
</pageHeader>

like this... so the pageheader will be printed when the fileformat is not "csv" and the pagenumber is 1.

 

not difficult, but i forgot that i can have more than one expression (with && or ||)...

Link to comment
Share on other sites

Hi,

I have a problem in dynamic display of pageHeader. In my case I do not know if the main report will be starting from page 1 or 2 or 3. As there is another subreport in the <title> band.

 

 

The subreport in the <title> band is displayed based on a condition(boolean).

 

Do you have any solution for this?

 

Mathew

Link to comment
Share on other sites

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...