Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » List box getParameterDisplayText()(How to display selected items text of a list box)
List box getParameterDisplayText() [message #537057] Tue, 01 June 2010 08:13 Go to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: June 2010
Junior Member
Hi everybody,

I have a list box as a parameter in my report with 'ID' as a column value and 'NAME' as display text.

I want to get the selected items, so with combo box for example i do 'reportContext.getParameterDisplayText()' but with list box it doesn't work.

Please help if you can. Thank you !
Re: List box getParameterDisplayText() [message #537216 is a reply to message #537057] Tue, 01 June 2010 15:27 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you log a bug for this? It should function like getting the
parameter value:

works
reportContext.getParameterValue( "MultiParm" )[0];

does not work.
reportContext.getParameterDisplayText( "MultiParm" )[0];

Jason

On 6/1/2010 4:13 AM, hassikou@hotmail.com wrote:
> Hi everybody,
>
> I have a list box as a parameter in my report with 'ID' as a column
> value and 'NAME' as display text.
>
> I want to get the selected items, so with combo box for example i do
> 'reportContext.getParameterDisplayText()' but with list box it doesn't
> work.
>
> Please help if you can. Thank you !
Re: List box getParameterDisplayText() [message #537368 is a reply to message #537057] Wed, 02 June 2010 08:35 Go to previous message
No real name is currently offline No real nameFriend
Messages: 2
Registered: June 2010
Junior Member
Here is a solution to save honor :

Basicly my query which aliments my ListBox is :
select id, name from myTable


In initiaze of my report, insert :
var selection = params["myListMultiSelect"].value.join();
reportContext.setPersistentGlobalVariable('selection', selection);


Otherwise i created another a simple DataSet :
select name from myTable


In the beforeOpen of this DataSet :
queryText="select name from myTable where id in ("+reportContext.getPersistentGlobalVariable('selection')+")"


Finally you can drag & drop a Table into the report & drag into it the unic column name of this dataSet.

Good Luck !

[Updated on: Wed, 02 June 2010 10:33]

Report message to a moderator

Previous Topic:[BIRT Report Viewer] Exception running on JBoss
Next Topic:Limit data retrieved
Goto Forum:
  


Current Time: Fri Apr 19 10:07:21 GMT 2024

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

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

Back to the top