Place each "Sub Item" and its data into a subtable and tell set that table/cell to not break on page breaks. This will force the entire block to the next page.
Vivek Mishra wrote: > Hi, > > I am using iText to generate PDF report in my application. Here we are > using PdfPTable. All the data is put in PdfPTable and then we add this > table to Document by using the "add" method of the Document class. The > data is peoperly displayed in PDF. But here we have one specific > requirement. Please see the example below. > > Page 1 > Group > Item > Sub Item1 > Measure1 > Measure2 > Measure3 > Measure4 > Sub Item2 > Measure1 > Measure2 > Measure3 > Measure4 > Sub Item3 > Measure1 > Measure2 > Measure3 > Measure4 > Sub Item4 > > Page 2 > Measure1 > Measure2 > Measure3 > Measure4 > > In above example the display of data is correct for Sub Item1 , Sub > Item2 , Sub Item3 but for Sub Item4 it is not correct because the > heading Sub Item4 appears on page 1 and the related measure data for the > Sub Item4 appears on Page 2. Now here my requirement is while displaying > the data if only heading Sub Item4 is appearing on the bottom of page > and the relevant measure data is appearing on next page then the heading > Sub Item4 should be moved to next page and the relevant measure data > should be displayed below it. This is need to be done similarly for Item > and Group as well to avoid data distortion in report. > Please advice. > > Regards, > Vivek > > Regards, > Vivek > > <http://clients.rediff.com/signature/track_sig.asp> -- cheeser You can find my blog at http://cheeser.blog-city.com and on AIM as "evan chooly" ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
