Problem:
            I need to build PDF's for a dynamic reporting environment (using 
iTextSharp in ASP.Net/C# 3.0 environment).  In general the end-user will be 
able to choose however many fields they would like to show up.  I would like to 
simulate something like SQL Reporting services where they will get repeating 
headers on each page, as well as having long rows break across pages (ie when 
they select 50 fields and the data is say 500 rows of data, the first 10 
fields/first 30 rows show on page 1, the next 10 fields/first 30 rows show on 
page 2, etc through page 5, then the next set of rows 31-60 appears on page 6, 
etc.

My general approach that I am thinking of taking is as follows:

Set up a table with the 50 columns

calculate approximate column widths by using getWidthPoint on the text in each 
column of the first row of data
use the columns widths to do SetTotalWidth

add my cells to the table

use PdfPTable.Size to get the number of rows in the table, then divide that by 
how many rows I think will fit on a page

use WriteSelectedRows(colStart, colEnd, rowStart, rowEnd, xPos, yPos, canvas) 
to write out x number of columns and n number of rows then do a new page and 
use WriteSelectedRows with the next batch of columns, do a new page, next set 
of columns, etc.


Does this makes sense?  In general is this the "correct" way to go about 
accomplishing what I need or am I going down a completely wrong path?

Also, I have ordered the book and it should be arriving tomorrow, so if the 
answer is "this exact situation is described in detail in the book, go buy it", 
I can live with that too

Thank you


Erik Pfingsten



This message, including any attachments, may contain information
which is confidential and privileged. Unless you are the addressee (or 
authorized to receive for the addressee), you may not read, use, copy 
or disclose to anyone the message, its attachments, or any information 
contained therein. If you have received the message in error, please 
advise the sender by reply e-mail and delete the message and any 
attachments.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to