wegnerk Posted October 17, 2006 Share Posted October 17, 2006 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 advancePost edited by: wegnerk, at: 2006/10/17 13:03 Link to comment Share on other sites More sharing options...
wegnerk Posted October 17, 2006 Author Share Posted October 17, 2006 ok, first think, then ask... ;) i found a suitable expression myself. Link to comment Share on other sites More sharing options...
mathewrond Posted October 18, 2006 Share Posted October 18, 2006 Can you share the logic please? Link to comment Share on other sites More sharing options...
wegnerk Posted October 18, 2006 Author Share Posted October 18, 2006 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 More sharing options...
mathewrond Posted October 23, 2006 Share Posted October 23, 2006 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 More sharing options...
Teodor Danciu Posted October 30, 2006 Share Posted October 30, 2006 Hi, I think you could try return the PAGE_NUMBER variable from the subreport.Our sample in /demo/samples/subreports shows how a value could be returned from a subreport to the master report. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now