Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » 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 15:03 Go to next message
Fernando  is currently offline Fernando Friend
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 15:20 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
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.
Re: (no subject) [message #710054 is a reply to message #710008] Thu, 04 August 2011 16:21 Go to previous message
Fernando  is currently offline Fernando Friend
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: Tue Apr 23 15:35:30 GMT 2024

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

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

Back to the top