Hi Paulo,
Report end result looks something like
this:
-----------------------------------------------------------------------------------------------------------------------
GST Tax <---------------------
TITLE
Year
1st Quarter 2nd Quater 3rd
Quater 4th Quater
2000
$2010.25
$2200.00 $3090.50
$2410.00
2001
$2010.25
$2200.00 $3090.50
$2410.00
2002
$2010.25
$2200.00 $3090.50
$2410.00
2003
$2010.25
$2200.00 $3090.50
$2410.00
2004
$2010.25
$2200.00 $3090.50
$2410.00
Payroll Tax
Year
1st Quarter 2nd Quater
3rd Quater 4th Quater
2000
$12010.25
$12200.00
$13090.50 $12410.00
2001
$22010.25
$22200.00
$23090.50 $22410.00
2002
$22010.25
$22200.00
$23090.50 $22410.00
2003
$32010.25
$32200.00
$33090.50
$32410.00
2004
$42010.25
$42200.00
$43090.50
$42410.00
-------------------------------------------------------------------------------------------------------------------------
Even with embed tables the table will break
across different pages. This is quite acceptable when your dealing with large
tables however if you have a table of say 2 records and a title appears on the
bottom of the previous page. What I need is to work out that I'm already
as the bottom of the current page, force a new page then let things work as
usual - dynamically.
You can't have that kind of fine control and do the
things dynamically as you say.
#### just an aside
With other reporting systems in another life I
could always access the report canvas interrogate the current
cursor and zap take appropriate action.
Looking under the hood of iText this doesn't seem
to be possible :-( I hope I missed something!
####
That's not possible because the cursor may not
reflect the correct position if you have pending lines and so on. If you
really want to go that way you can place an empty Paragraph with zero leading
and catch the onParagraph event. I'm always amazed at the effort people do to
use Document.add(), creating the most twisted code I've seen just to avoid to
keep track at the y position when placing ColumnText and PdfPTable at absolute
positions.
Best Regards,
Paulo Soares
Kind Regards,
George Shafik
----- Original Message -----
Sent: Tuesday, September 14, 2004 7:15
PM
Subject: RE: [iText-questions] how do I
know the physical location on a given document
Try it with a nested table.
Best Regards,
Paulo Soares
Hi All,
I need to determine where I'm physically in a
document before forcing a new page.
Currently I have 2
tables - one with the title of the table and the other containing the
data. Unfortunately the title sometimes appears on the bottom of the
previous page. What would be great if I could determine that I'm already
at the bottom of the current document force a new page that way the
table title and table data appear on the same page.
Cheers,
George Shafik