Skip to main content



      Home
Home » Archived » BIRT » Table has inconsistent column count error
Table has inconsistent column count error [message #669828] Wed, 11 May 2011 13:45 Go to next message
Eclipse UserFriend
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
Re: Table has inconsistent column count error [message #669841 is a reply to message #669828] Wed, 11 May 2011 14:37 Go to previous message
Eclipse UserFriend
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
>
Previous Topic:BIRT calling dynamic datasource multiple times
Next Topic:Problem with input parameters like ?
Goto Forum:
  


Current Time: Tue Jul 01 22:56:09 EDT 2025

Powered by FUDForum. Page generated in 0.06408 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top