Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Dynamic Report; No Values Appear
Dynamic Report; No Values Appear [message #763413] Fri, 09 December 2011 18:12 Go to next message
John Roberts is currently offline John Roberts
Messages: 18
Registered: August 2011
Junior Member
Any help would be appreciated:

I have a report structured as follows; A list where each item is a table. The table is 2 columns with item name and item value.

ID 2
Name Sam

ID 4
Name Sue

etc.

So I see the table created the expected number of times, e.g., I expect three return records and I see three tables. The field names are there. But the field values are blank.

I cannot paste the code in because it's on an internal network - but here's some snippets;

table.insertRow(new RowOperationParameters(2,-1,row));

RowHandle rowHandle = (RowHandle) table.getDetail(row);

CellHandle valueCell = (CellHandle) rowHandle.getCells().get(1); // value cell

TextItemHandle text = designFactory.newTextItem("someName");
text.setContentType(DesignChoiceContsants.TEXT_DATA_CONTENT_TYPE_HTML);
text.setContent("<VALUE-OF>row[\"FieldName\"]</VALUE-OF>");
valueCell.getContent().add(text);

Any ideas?

Re: Dynamic Report; No Values Appear [message #764657 is a reply to message #763413] Mon, 12 December 2011 15:49 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

So you use a list item bound to your dataset and have a nested table in
the the list item detail row? If you you want labels for each row why
not use a grid instead of a table. Why are you inserting a row into the
table? Is the code that inserts the row called before the report is
executed or is it in an event?

Jason

On 12/9/2011 1:12 PM, John Roberts wrote:
> Any help would be appreciated:
>
> I have a report structured as follows; A list where each item is a
> table. The table is 2 columns with item name and item value.
>
> ID 2
> Name Sam
>
> ID 4
> Name Sue
>
> etc.
>
> So I see the table created the expected number of times, e.g., I expect
> three return records and I see three tables. The field names are there.
> But the field values are blank.
> I cannot paste the code in because it's on an internal network - but
> here's some snippets;
>
> table.insertRow(new RowOperationParameters(2,-1,row));
>
> RowHandle rowHandle = (RowHandle) table.getDetail(row);
>
> CellHandle valueCell = (CellHandle) rowHandle.getCells().get(1); //
> value cell
> TextItemHandle text = designFactory.newTextItem("someName");
> text.setContentType(DesignChoiceContsants.TEXT_DATA_CONTENT_TYPE_HTML);
> text.setContent("<VALUE-OF>row[\"FieldName\"]</VALUE-OF>");
> valueCell.getContent().add(text);
> Any ideas?
>
>
Re: Dynamic Report; No Values Appear [message #765302 is a reply to message #764657] Tue, 13 December 2011 20:07 Go to previous messageGo to next message
John Roberts is currently offline John Roberts
Messages: 18
Registered: August 2011
Junior Member
Ok - I will try a grid.
Re: Dynamic Report; No Values Appear [message #765303 is a reply to message #765302] Tue, 13 December 2011 20:08 Go to previous messageGo to next message
John Roberts is currently offline John Roberts
Messages: 18
Registered: August 2011
Junior Member
Ok - I tried a grid instead of a table - same thing. The problem is that text.setContent("<VALUE-OF>row[\"FieldName\"]</VALUE-OF>"); does not produce a value.
Re: Dynamic Report; No Values Appear [message #765738 is a reply to message #765303] Wed, 14 December 2011 15:44 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

John,

Is the text element in a table that is bound to a data set?
BTW are your setting?
text.setContentType( DesignChoiceConstants.TEXT_CONTENT_TYPE_HTML );

Jason

On 12/13/2011 3:08 PM, John Roberts wrote:
> Ok - I tried a grid instead of a table - same thing. The problem is that
> text.setContent("<VALUE-OF>row[\"FieldName\"]</VALUE-OF>"); does not
> produce a value.
Re: Dynamic Report; No Values Appear [message #765765 is a reply to message #765738] Wed, 14 December 2011 16:33 Go to previous message
John Roberts is currently offline John Roberts
Messages: 18
Registered: August 2011
Junior Member
Nope - that was the problem; did not bind properly to the dataset.

Jason Weathersby wrote on Wed, 14 December 2011 10:44
John,

Is the text element in a table that is bound to a data set?
BTW are your setting?
text.setContentType( DesignChoiceConstants.TEXT_CONTENT_TYPE_HTML );

Jason

On 12/13/2011 3:08 PM, John Roberts wrote:
> Ok - I tried a grid instead of a table - same thing. The problem is that
> text.setContent("<VALUE-OF>row[\"FieldName\"]</VALUE-OF>"); does not
> produce a value.

Previous Topic:Reg:Report Engine start and shutdown
Next Topic:Table grouping help
Goto Forum:
  


Current Time: Thu Sep 18 05:58:12 GMT 2014

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

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