Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Wrap test for excel(Wrap test for excel)
Wrap test for excel [message #760192] Thu, 01 December 2011 15:07 Go to next message
harip kaligo is currently offline harip kaligo
Messages: 74
Registered: July 2011
Member
Hi,

We are dynamically creating a table and rendering the report,
is there any way we can apply nowrap to the text for the table cells created dynamically.

Thanks,
KKP
Re: Wrap test for excel [message #760225 is a reply to message #760192] Thu, 01 December 2011 16:06 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Create a style in the report with the nowrap whitespace setting. Then
when get the cellhandle just use:
ch.setProperty("style", "younowrapstylename");

Jason

On 12/1/2011 10:07 AM, kkp wrote:
> Hi,
>
> We are dynamically creating a table and rendering the report,
> is there any way we can apply nowrap to the text for the table cells
> created dynamically.
>
> Thanks,
> KKP
Re: Wrap test for excel [message #760236 is a reply to message #760225] Thu, 01 December 2011 16:45 Go to previous messageGo to next message
harip kaligo is currently offline harip kaligo
Messages: 74
Registered: July 2011
Member
Jason,

Below is the code we have in before factory:

var cs1 = StructureFactory.createComputedColumn();
cs1.setName(rsColumn);
cs1.setExpression( "dataSetRow[\"" + rsColumn + "\"]" );
colbinds.addItem(cs1);
mytable.insertColumn(i+1,-1);
var mydetail = mytable.getDetail().get(0);
var hcell = mydetail.getCells().get(i);
var mydata = elementFactory.newDataItem(null);
mydata.setResultSetColumn(rsColumn);
hcell.getContent().add(mydata);
//get header and add label
var myheader = mytable.getHeader().get(0);
var dcell = myheader.getCells().get(i);
var mylabel = elementFactory.newLabel(null);
mylabel.setText(label);//$NON-NLS-1$
dcell.getContent().add( mylabel );


So can I set nowrap property for the lablel here?
Re: Wrap test for excel [message #760261 is a reply to message #760236] Thu, 01 December 2011 17:25 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

You can set a style for the labelhandle, the same way I posted about a
cellhandle.

Jason

On 12/1/2011 11:45 AM, kkp wrote:
> Jason,
>
> Below is the code we have in before factory:
>
> var cs1 = StructureFactory.createComputedColumn();
> cs1.setName(rsColumn);
> cs1.setExpression( "dataSetRow[\"" + rsColumn + "\"]" );
> colbinds.addItem(cs1);
> mytable.insertColumn(i+1,-1);
> var mydetail = mytable.getDetail().get(0);
> var hcell = mydetail.getCells().get(i);
> var mydata = elementFactory.newDataItem(null);
> mydata.setResultSetColumn(rsColumn);
> hcell.getContent().add(mydata);
> //get header and add label
> var myheader = mytable.getHeader().get(0);
> var dcell = myheader.getCells().get(i);
> var mylabel = elementFactory.newLabel(null);
> mylabel.setText(label);//$NON-NLS-1$
> dcell.getContent().add( mylabel );
>
>
> So can I set nowrap property for the lablel here?
Previous Topic:Page Numbering when using RunAndRender in 3.7.1
Next Topic:java.io.IOException: Content is not allowed in prolog.
Goto Forum:
  


Current Time: Thu Sep 18 10:01:45 GMT 2014

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

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