Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Fetching report parameter value
Fetching report parameter value [message #544080] Thu, 01 July 2010 14:33 Go to next message
mkrivic Mising name is currently offline mkrivic Mising nameFriend
Messages: 33
Registered: May 2010
Member
Hi,

Is there any way to fetch report parameter value?

For example, I have default parameter value in dataset, and I would like to fetch that value and show in column.

I tried with this:

myValue = params["Name"];

but doesn't work...
Re: Fetching report parameter value [message #544087 is a reply to message #544080] Thu, 01 July 2010 14:38 Go to previous messageGo to next message
Richard A. Polunsky is currently offline Richard A. PolunskyFriend
Messages: 212
Registered: July 2009
Location: Houston TX
Senior Member

There's not going to be a simple way. The value you want isn't a direct attribute of the parameter, it's part of the report design. There's probably an API call that will fetch it - someone more experienced in that area can address this.
Re: Fetching report parameter value [message #544113 is a reply to message #544080] Thu, 01 July 2010 15:28 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Is this a dataset parmeter or a report parameter.
myValue= params["Name"].value should work to retrieve the current report
parameter value. If you want the default value you could call the RE
API from script like :
var rr = reportContext.getReportRunnable();
var engine = rr.getReportEngine();
var tsk = engine.createGetParameterDefinitionTask( rr );
aaa = tsk.getDefaultValue("Name");
tsk.close();

Jason

On 7/1/2010 10:33 AM, mkrivic wrote:
> Hi,
>
> Is there any way to fetch report parameter value?
>
> For example, I have default parameter value in dataset, and I would like
> to fetch that value and show in column.
>
> I tried with this:
>
> myValue = params["Name"];
>
> but doesn't work...
Re: Fetching report parameter value [message #544380 is a reply to message #544113] Fri, 02 July 2010 13:57 Go to previous messageGo to next message
mkrivic Mising name is currently offline mkrivic Mising nameFriend
Messages: 33
Registered: May 2010
Member
Jason and Richard, thanks for your reply.

I would like if you could tell me one more thing:

how could I fetch some value in row during creation?

for example,
i know how to catch row value:

some_var = row["Name"];

now, how can I do this in reverse way:

example
row["Name"] = some_var;

Is this correct or...?

Regards,
Re: Fetching report parameter value [message #544382 is a reply to message #544080] Fri, 02 July 2010 14:00 Go to previous messageGo to next message
Richard A. Polunsky is currently offline Richard A. PolunskyFriend
Messages: 212
Registered: July 2009
Location: Houston TX
Senior Member

It sounds like you want to replace the field value in that row with a different value. I'm not sure where that would be necessary. Do you really just want to display a different value on the final report? If you can explain what your full goal is for this question, people can have a better idea how to answer.
Re: Fetching report parameter value [message #544384 is a reply to message #544382] Fri, 02 July 2010 14:06 Go to previous messageGo to next message
mkrivic Mising name is currently offline mkrivic Mising nameFriend
Messages: 33
Registered: May 2010
Member
I have two datasets binded to two different tables:

dataset1 and
dataset2

When I show dataset1 on report in table, on tableCreate event, I am fetching some values.
Then, each of that values I want to bind in dataset2 to be default value in some dataset parameter.

Is that possible?

Re: Fetching report parameter value [message #544410 is a reply to message #544080] Fri, 02 July 2010 15:17 Go to previous messageGo to next message
Richard A. Polunsky is currently offline Richard A. PolunskyFriend
Messages: 212
Registered: July 2009
Location: Houston TX
Senior Member

I'm still confused when you say you want to set the default parameter on dataset 2 based on data already retrieved from dataset 1 and used in table 1. BIRT prompts for all parameters at the same time.
Re: Fetching report parameter value [message #544489 is a reply to message #544410] Fri, 02 July 2010 20:46 Go to previous messageGo to next message
mkrivic Mising name is currently offline mkrivic Mising nameFriend
Messages: 33
Registered: May 2010
Member
Richard, sorry if my explanation is confusing...
I''ll simplify:

Can I onCreate event on table row change some row value?

for example:

onCreate event on table row I want to change my data value:

ex:
if (this.getRowData().getExpressionValue("row[WI_ID]") == 2851){
row["WI_ID"] = 2852;
}

so, on row create I want to change data value...

Regards,
Re: Fetching report parameter value [message #544492 is a reply to message #544080] Fri, 02 July 2010 20:56 Go to previous message
Richard A. Polunsky is currently offline Richard A. PolunskyFriend
Messages: 212
Registered: July 2009
Location: Houston TX
Senior Member

I wouldn't do it there unless there's something else referencing that data valye. If you're just trying to change the amount that shows on the report, I would do that with the Map property.
Previous Topic:Can't Refresh Chart rather than Re-Build and Render
Next Topic:Plot location
Goto Forum:
  


Current Time: Thu Apr 25 01:38:12 GMT 2024

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

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

Back to the top