It's all about the answers!

Ask a question

Get Project Area ItemID in reportContext for a custom report


Andrea Ianni (1611916) | asked Mar 11 '10, 6:11 a.m.
Hi all,
to make my custom reports more reusable, I need to get from the context the value of project area ItemID .

I tried with reportContext.getAppContext().get(" PROJECT_AREA ") but I need only the value of ItemID. Is there some method or I have to parse the result of getAppContext().get(" PROJECT_AREA ") method?

Thanks
Andrea

2 answers



permanent link
James Moody (3.3k24) | answered Mar 18 '10, 3:06 p.m.
JAZZ DEVELOPER
On 3/11/2010 6:23 AM, aianni wrote:
Hi all,
to make my custom reports more reusable, I need to get from the
context the value of project area ItemID .

I tried with reportContext.getAppContext().get(" PROJECT_AREA
") but I need only the value of ItemID. Is there some method or
I have to parse the result of getAppContext().get(" PROJECT_AREA
") method?

Thanks
Andrea


Hi Andrea,

Sorry for the delay in responding.

To do this, create a data source on COMMON_SNAPSHOT. Now create a data
set on PROJECT_AREA. Select PROJECT_AREA_ITEMID as a column, and
PROJECT_AREA_NAME as a parameter. Pass the default value '{Current
Project Area}' (including the single quotes) as the value for the
PROJECT_AREA_NAME parameter. This should always return a single row,
where the item id for the current project area is located. You can use
onFetch to store this value in a global javascript variable for use
elsewhere in your report.

james
RTC Reports Team Lead

permanent link
Andrea Ianni (1611916) | answered May 14 '10, 4:40 a.m.
On 3/11/2010 6:23 AM, aianni wrote:

Hi Andrea,

Sorry for the delay in responding.

To do this, create a data source on COMMON_SNAPSHOT. Now create a data
set on PROJECT_AREA. Select PROJECT_AREA_ITEMID as a column, and
PROJECT_AREA_NAME as a parameter. Pass the default value '{Current
Project Area}' (including the single quotes) as the value for the
PROJECT_AREA_NAME parameter. This should always return a single row,
where the item id for the current project area is located. You can use
onFetch to store this value in a global javascript variable for use
elsewhere in your report.

james
RTC Reports Team Lead


Thanks james, it works!

Your answer


Register or to post your answer.