Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Table has inconsistent column count error
Table has inconsistent column count error [message #669828] Wed, 11 May 2011 17:45 Go to next message
Neil Wang is currently offline Neil WangFriend
Messages: 105
Registered: July 2009
Senior Member
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 18:37 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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: Thu Apr 25 04:06:46 GMT 2024

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

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

Back to the top