Get Project Area ItemID in reportContext for a custom report
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
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
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
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
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!