« Return to Thread: In 3 col x 7 row table cannot add less than 21 records

Re: In 3 col x 7 row table cannot add less than 21 records

by bogorman :: Rate this Message:

Reply to Author | View in Thread

Hi Paulo,

It now works perfectly. Thanks very much indeed for you help.

Brian

Paulo Soares-3 wrote:
It's only a multiple of 21 if you have 21 columns but I guess what you have
are nested tables. Before document.Add() call table.CompleteRow().

Paulo~

----- Original Message -----
From: "bogorman" <brian_og@hotmail.com>
To: <itextsharp-questions@lists.sourceforge.net>
Sent: Tuesday, June 09, 2009 5:17 PM
Subject: Re: [itextsharp-questions] In 3 col x 7 row table cannot add less
than 21 records


>
> Hi Paulo,
> Have looked at the examples but cannot find one which describes how to
> complete a row. Can you suggest one?
> I suppose, alternatively, I could add coding to the SQL statement which
> generates the recordset to ensure that the number of records is padded
> (with
> extra blank records) to make the total a multiple of 21, though this seems
> an inelegant way of doing it.
> Have even searched the examples pages you suggest for the CompleteRow
> function but still cannot find one containing it.
> Sorry to trouble you again.
> Brian
>
> Paulo Soares-3 wrote:
>>
>>
>>
>>> -----Original Message-----
>>> From: bogorman [mailto:brian_og@hotmail.com]
>>> Sent: Tuesday, June 09, 2009 9:27 AM
>>> To: itextsharp-questions@lists.sourceforge.net
>>> Subject: Re: [itextsharp-questions] In 3 col x 7 row table
>>> cannot add less than 21 records
>>>
>>>
>>> Hi Paulo,
>>> Thanks again for your help.
>>> Cannot understand how the cell height could cause this (am
>>> probably being
>>> dumb!!)
>>> Maybe I have not described the problem correctly:
>>> The pdf created is perfect if the recordset contains 21
>>> records, or 42, or
>>> 63.. records
>>> If, for example, the recordset contains only 1 record, I get the error
>>> mentioned previously.
>>> If, for example, the recordset contains 22 records, a pdf
>>> with one page
>>> containing 21 records is created with perfect spacing but no
>>> second page is
>>> created (I have lost the final record).
>>> I can't understand how the cell height could cause this but
>>> maybe I am not
>>> understanding it.
>>> If I should use SplitLate or CompleteRow, could you give me
>>> an example of
>>> the coding?
>>> Regards
>>> Brian
>>>
>>>
>>
>> PdfPTable only outputs complete rows. Check that you are writing all the
>> columns in that row. There are lots of examples at
>> http://1t3xt.info/examples/browse/index.php.
>>
>> Paulo


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
itextsharp-questions mailing list
itextsharp-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itextsharp-questions

 « Return to Thread: In 3 col x 7 row table cannot add less than 21 records