hello world
I’m doing a report that has to display userId, username, group and user group name.
userId, username and group are solved.
The trick is with the two: Group and UsergroupName
Group: retrieve only the users that are managers {solved}
UserGroupName: retrieve all other groups that the manager has permission to e.g Admin, DocHand etc {not solved}; the problem with this field is that it retrieves only one group for all the managers, instead of displaying all groups that each manager has permission to, whether it’s 5 groups or more or even less.
Here is my fetch method:
public boolean fetch()
{
boolean ret;
QueryRun qr;
QueryBuildDataSource qbs;
UserGroupList userGroupList;
UserGroupInfo userGroupInfo;
UserInfo userInfo;
qr = new QueryRun(element.query());
// qbs = qr.query().dataSourceTable(tablenum(UserGroupList));
ret = super();
while (qr.next())
{
userGroupList = qr.get(tablenum(UserGroupList));
name = (select name from userInfo where userInfo.id == userGroupList.userId).name;
element.send(userGroupList);
}
// return ret;
return true;
}
What am I doing wrong? Please help…
Thanks
Sinoyolo