passing current user id in BIRT report parameter
3 answers
You will need to create a data set that use the COMMON_SNAPSHOT.CONTRIBUTOR table. Pass the '{Current Contributor}' value as a parameter data set, then have the data set give you back the contributor name (or whatever you need back). You can bind the data set to a hidden dynamic text element and store the result in a global javascript variable that you can user later.
You will need to create a data set that use the COMMON_SNAPSHOT.CONTRIBUTOR table. Pass the '{Current Contributor}' value as a parameter data set, then have the data set give you back the contributor name (or whatever you need back). You can bind the data set to a hidden dynamic text element and store the result in a global javascript variable that you can user later.
Hi Rafik,
I tried this method, but still doesn't work.
I used table VARIABLE from REPORTS snapshot, and passed the '{Current Contributor}' as PARAMETER. On initialize method I created global variable. then, I created a Dynamic Text field which I binded to data set VARIABLE, and in Dynamic Text field I wrote this:
globVar = row;
I can get this anywhere after I run report, but my question is would it be possible to get current user before report starts, that is, to get it as default value in report parameter input pick list...
Hope you understood my question.
Thanks,
You will need to create a data set that use the COMMON_SNAPSHOT.CONTRIBUTOR table. Pass the '{Current Contributor}' value as a parameter data set, then have the data set give you back the contributor name (or whatever you need back). You can bind the data set to a hidden dynamic text element and store the result in a global javascript variable that you can user later.
Hi Rafik,
I tried this method, but still doesn't work.
I used table VARIABLE from REPORTS snapshot, and passed the '{Current Contributor}' as PARAMETER. On initialize method I created global variable. then, I created a Dynamic Text field which I binded to data set VARIABLE, and in Dynamic Text field I wrote this:
globVar = row;
I can get this anywhere after I run report, but my question is would it be possible to get current user before report starts, that is, to get it as default value in report parameter input pick list...
Hope you understood my question.
Thanks,
Hi Rafik,
I tried with the current date in default value parameter:
var currDate = new Date();
currDate;
This works on preview tab, but doesn't work when you deploy report design. It is treated like a "string".
Even if I find the method for my situation, I am not sure how it will be treated.
Regards,