It's all about the answers!

Ask a question

Obtain current user for Birt report


Adam Coulthard (1322116) | asked Jun 07 '10, 7:12 a.m.
I would like to construct a BIRT report that uses the current signed on user as part of the birt query. I've not been able to find the solution so far. Does anyone have any ideas how to do this?

Thanks

Adam

3 answers



permanent link
James Moody (3.3k24) | answered Jun 07 '10, 11:56 a.m.
JAZZ DEVELOPER
On 6/7/2010 7:23 AM, adamcoulthard wrote:
I would like to construct a BIRT report that uses the current signed
on user as part of the birt query. I've not been able to find the
solution so far. Does anyone have any ideas how to do this?

Thanks

Adam


Here's a trick for you.

Create a data source on REPORTS_SNAPSHOT, and a data set on the
VARIABLES "table". Pass in the string '{Current Contributor}' as the
key, and select the same column as the result. This is a magic view that
takes one of our special variables as input and returns the result to
you. If I'm not mistaken the result in this case should be the UUID of
the contributor, which can then be looked up in the contributor table.

james
RTC Reports Team Lead

permanent link
Adam Coulthard (1322116) | answered Jun 08 '10, 7:43 a.m.
On 6/7/2010 7:23 AM, adamcoulthard wrote:
I would like to construct a BIRT report that uses the current signed
on user as part of the birt query. I've not been able to find the
solution so far. Does anyone have any ideas how to do this?

Thanks

Adam


Here's a trick for you.

Create a data source on REPORTS_SNAPSHOT, and a data set on the
VARIABLES "table". Pass in the string '{Current Contributor}' as the
key, and select the same column as the result. This is a magic view that
takes one of our special variables as input and returns the result to
you. If I'm not mistaken the result in this case should be the UUID of
the contributor, which can then be looked up in the contributor table.

james
RTC Reports Team Lead

Hi James,

Thanks for the tip that is brilliant, works like a charm :-).

Adam

permanent link
Kevin Behrens (7132) | answered Jun 06 '11, 2:43 p.m.
I was super pleased to see this. I want to do something very similar (perhaps the same and I've just missed it).

I've got a report that is taking the userid as a parameter (selected from a dynamically generated listsbox populated with CONTRIBUTOR_USERID). This works correctly.

I'd love for the default value of the parameter to be the current users ID.

I'd be eternally grateful to anyone who could nudge me in the right direction.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.