|
Re: Table has inconsistent column count error [message #669841 is a reply to message #669828] |
Wed, 11 May 2011 18:37 |
|
Neil,
Drop the column as well:
TableHandle th = (TableHandle)report.findElement("mytable");
RowHandle header = (RowHandle) th.getHeader( ).get( 0 );
header.getCells().get(0).drop();
RowHandle detail1 = (RowHandle) th.getDetail().get( 0 );
detail1.getCells().get(0).drop();
RowHandle detail2 = (RowHandle) th.getDetail().get( 1 );
RowHandle footer = (RowHandle) th.getFooter( ).get( 0 );
footer.getCells().get(0).drop();
th.getColumns().get(0).drop();
Jason
On 5/11/2011 1:45 PM, Neil Wang wrote:
> Hi,
>
> I have a table which has 7 columns. The table has two header
> rows and one detail row. I remove a column programmatically
> like this:
>
> RowHandle rowHandle =
> (RowHandle)tableHandle.getHeader().get(0);
> rowHandle.getCells().get(0).drop();
> rowHandle = (RowHandle)tableHandle.getHeader().get(1);
> rowHandle.getCells().get(0).drop();
> rowHandle = (RowHandle)tableHandle.getDetail().get(0);
> rowHandle.getCells().get(0).drop();
>
> I did a getColumnCount() on tableHandle and the count is
> always 7 even after a column has been removed. I opened the
> report design file and the error log has this error: "The
> table "Table("Table")" has inconsistent column count"
>
> please advise,
>
> Neil
>
|
|
|
Powered by
FUDForum. Page generated in 0.02891 seconds