malviyavivek Posted January 29, 2011 Share Posted January 29, 2011 Hi all,I want to display some records in a subreport based on a condition, following is the scenario:I have 5 records to be displayed in four subreports each, out of them, only 2 of the records should be displayed in the first page of main report, remaining should be displayed on subsequent pages.I have used page break, but for that I have to limit the number of records from my code itself, then using a different subreport for remaining records, is there any way to do this using iReport.Also in the subsequent pages, I want to display some part of Page header only, not all of it's contents.Please provide a solution for this...Thanks,Vivek Link to comment Share on other sites More sharing options...
walmillard Posted January 31, 2011 Share Posted January 31, 2011 Do you know the Condition ahead of time or is it based on the data?Each report data element (inc subreports) have a "print when expression" that have be set to a Boolean condition to include or exclude the element from the report.Boolean.TRUE will print it Boolean.FALSE will exclude it.the code will print $F{MyField} only when it has the value 1.Post some example data? Code: Post Edited by walmillard at 01/31/2011 05:20 Link to comment Share on other sites More sharing options...
malviyavivek Posted February 2, 2011 Author Share Posted February 2, 2011 Yes Wal,I know the conditon in advance, the situation that is given in the Query is real time, and I have to fullfil that only.I have used the conditons, like $F{MyField}.equals("Other Field"), in print when expression, but no result.Actually I have to break the subreport based on the number of records in it, that too, after 2 records...ThanksVivekPost Edited by malviyavivek at 02/02/2011 08:09 Link to comment Share on other sites More sharing options...
abhishekanne Posted June 2, 2011 Share Posted June 2, 2011 I am facing same problem. I need to print the 6 records per page.I am printing records using subreport.I have to place subreport middle of page.but contenet above the sub report and below sub report should remain same in subsequent page only next page should contain next 6 records.Can you tell how to do this using ireport .Thanks in Advance. 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