Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » How to access the parameters of report in chart script ?
How to access the parameters of report in chart script ? [message #709988] Thu, 04 August 2011 11:03 Go to next message
Fernando  is currently offline Fernando
Messages: 27
Registered: July 2011
Junior Member
I am trying access the parameters of report by script (chart),
and the following error is occurring
+ ReferenceError: "params" is not defined. at line 22 of chart script:''

Exemplo:

function beforeDrawBlock( block, icsc )
{
importPackage(Packages.org.eclipse.birt.chart.model.attribute);
var fontColor = params["P_FONTCOLOR"];


color = ColorDefinitionImpl.create(
hexToR(background),
hexToG(background),
hexToB(background));

block.setBackground(color);


Help Please.
(no subject) [message #710008 is a reply to message #709988] Thu, 04 August 2011 11:20 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Try

icsc.getExternalContext().getScriptable().getParameterValue("yourparameter"))

Jason

On 8/4/2011 11:03 AM, Fernando wrote:
> I am trying access the parameters of report by script (chart), and the
> following error is occurring
> + ReferenceError: "params" is not defined. at line 22 of chart script:''
>
> Exemplo:
>
> function beforeDrawBlock( block, icsc )
> {
> importPackage(Packages.org.eclipse.birt.chart.model.attribute); var
> fontColor = params["P_FONTCOLOR"];
>
> color = ColorDefinitionImpl.create(
> hexToR(background), hexToG(background), hexToB(background));
> block.setBackground(color);
>
>
> Help Please.


Jason Weathersby

BIRT Exchange
Re: (no subject) [message #710054 is a reply to message #710008] Thu, 04 August 2011 12:21 Go to previous message
Fernando  is currently offline Fernando
Messages: 27
Registered: July 2011
Junior Member
Perfect.
Thanks Jason.
Previous Topic:Disable default styles
Next Topic:how to create a non row based free form report in BIRT
Goto Forum:
  


Current Time: Sat Apr 19 23:16:25 EDT 2014

Powered by FUDForum. Page generated in 0.01441 seconds