I have added a data element to one of the column of the grid.In the onRender script of the data element , i want to access the value of a computed column of a particular datset.

I tried doing something like this:

temp=reportContext.getDesignHandle().findDataSet("Design Defects Not found in Design Phase").computedColumnsIterator().next();

this.setDisplayValue(temp);

But this script only fetches me the object, not the value.

Can you please help me on how to access the value of a computed data column from the script.

Thanks!

Rupal]]>

column to the binding and just reference it like:

this.setDisplayValue(this.getRowData().getColumnValue("COMPUTEDCOLUMNBINDINGNAME"));

See attached example

Jason

On 8/8/2012 7:11 AM, Rupal Biyani wrote:

> Hi,

>

> I have added a data element to one of the column of the grid.In the

> onRender script of the data element , i want to access the value of a

> computed column of a particular datset.

> I tried doing something like this:

> temp=reportContext.getDesignHandle().findDataSet("Design Defects Not

> found in Design Phase").computedColumnsIterator().next();

> this.setDisplayValue(temp);

>

> But this script only fetches me the object, not the value.

>

> Can you please help me on how to access the value of a computed data

> column from the script.

>

> Thanks!

> Rupal]]>

That iterator will only get you the design not the values. Is you data

item bound to a dataset or is the grid? In either case add the computed

column to the binding and just reference it like:

this.setDisplayValue(this.getRowData().getColumnValue("COMPUTEDCOLUMNBINDINGNAME"));

See attached example

Jason

On 8/8/2012 7:11 AM, Rupal Biyani wrote:

> Hi,

>

> I have added a data element to one of the column of the grid.In the

> onRender script of the data element , i want to access the value of a

> computed column of a particular datset.

> I tried doing something like this:

> temp=reportContext.getDesignHandle().findDataSet("Design Defects Not

> found in Design Phase").computedColumnsIterator().next();

> this.setDisplayValue(temp);

>

> But this script only fetches me the object, not the value.

>

> Can you please help me on how to access the value of a computed data

> column from the script.

>

> Thanks!

> Rupal

Jason,

My requirement is as follows:

I need to display the values of various project metrics in a grid.

This project metric is a ratio,where the numerator and denominator comes from two different data sets.But since we can attach, only one datset to an element.I cannot calculate the ratio.

Right now i have made a invisible grid with many tables, that stores the values of these numerators and denominators and then in the final grid using OnRender script, i calculate the values.

I wanted to ask is there any other way through which we can do this?

I am attaching the file for your reference.

]]>

Jason

On 8/10/2012 1:26 AM, Rupal Biyani wrote:

> Jason Weathersby wrote on Wed, 08 August 2012 11:33

>> That iterator will only get you the design not the values. Is you data

>> item bound to a dataset or is the grid? In either case add the computed

>> column to the binding and just reference it like:

>>

>> this.setDisplayValue(this.getRowData().getColumnValue("COMPUTEDCOLUMNBINDINGNAME"));

>>

>> See attached example

>>

>> Jason

>>

>> On 8/8/2012 7:11 AM, Rupal Biyani wrote:

>>> Hi,

>>>

>>> I have added a data element to one of the column of the grid.In the

>>> onRender script of the data element , i want to access the value of a

>>> computed column of a particular datset.

>>> I tried doing something like this:

>>> temp=reportContext.getDesignHandle().findDataSet("Design Defects Not

>>> found in Design Phase").computedColumnsIterator().next();

>>> this.setDisplayValue(temp);

>>>

>>> But this script only fetches me the object, not the value.

>>>

>>> Can you please help me on how to access the value of a computed data

>>> column from the script.

>>>

>>> Thanks!

>>> Rupal

>

>

> Jason,

>

> My requirement is as follows:

>

> I need to display the values of various project metrics in a grid.

> This project metric is a ratio,where the numerator and denominator comes from two different data sets.But since we can attach, only one datset to an element.I cannot calculate the ratio.

> Right now i have made a invisible grid with many tables, that stores the values of these numerators and denominators and then in the final grid using OnRender script, i calculate the values.

>

> I wanted to ask is there any other way through which we can do this?

> I am attaching the file for your reference.

>]]>

Jason

On 8/13/2012 12:22 PM, Jason Weathersby wrote:

> Yes but first do the datasets return more than one row?

>

> Jason

>

> On 8/10/2012 1:26 AM, Rupal Biyani wrote:

>> Jason Weathersby wrote on Wed, 08 August 2012 11:33

>>> That iterator will only get you the design not the values. Is you data

>>> item bound to a dataset or is the grid? In either case add the computed

>>> column to the binding and just reference it like:

>>>

>>> this.setDisplayValue(this.getRowData().getColumnValue("COMPUTEDCOLUMNBINDINGNAME"));

>>>

>>>

>>> See attached example

>>>

>>> Jason

>>>

>>> On 8/8/2012 7:11 AM, Rupal Biyani wrote:

>>>> Hi,

>>>>

>>>> I have added a data element to one of the column of the grid.In the

>>>> onRender script of the data element , i want to access the value of a

>>>> computed column of a particular datset.

>>>> I tried doing something like this:

>>>> temp=reportContext.getDesignHandle().findDataSet("Design Defects Not

>>>> found in Design Phase").computedColumnsIterator().next();

>>>> this.setDisplayValue(temp);

>>>>

>>>> But this script only fetches me the object, not the value.

>>>>

>>>> Can you please help me on how to access the value of a computed data

>>>> column from the script.

>>>>

>>>> Thanks!

>>>> Rupal

>>

>>

>> Jason,

>>

>> My requirement is as follows:

>>

>> I need to display the values of various project metrics in a grid.

>> This project metric is a ratio,where the numerator and denominator

>> comes from two different data sets.But since we can attach, only one

>> datset to an element.I cannot calculate the ratio.

>> Right now i have made a invisible grid with many tables, that stores

>> the values of these numerators and denominators and then in the final

>> grid using OnRender script, i calculate the values.

>>

>> I wanted to ask is there any other way through which we can do this?

>> I am attaching the file for your reference.

>>

>]]>