HQL report example

<?xml version='1.0' encoding='UTF-8'?>

Entitlements (memberOf) requested for an identity within a date range.
Approach: Filter DataSource on IdentityRequestItem.

name == “memberOf”

Identity
Identity for whom entitlements were requested

Start Date
Request created on or after this date

End Date
Request created on or before this date

Entitlements (memberOf) requested for an identity within a date range.
Approach: Java DataSource (LcmIdentityRequestStatusJavaDataSource).

EntitlementsRequest

<![CDATA[
import java.util.*;

Object start = value;
Object end = args != null ? args.get(“endDate”) : null;

if (start != null && end != null && args != null) {
List dateRange = new ArrayList();
dateRange.add(start);
dateRange.add(end);
args.put(“requestDateRange”, dateRange);
}

return queryOptions;
]]>

Identity
Identity for whom entitlements were requested

Start Date
Request created on or after this date

End Date
Request created on or before this date

Entitlements (memberOf) requested for an identity within a date range.
Approach: HQL DataSource on IdentityRequestItem.

from sailpoint.object.IdentityRequestItem iri where iri.name = ‘memberOf’

<![CDATA[
import java.util.*;

if (args.containsKey(“identity”) && args.get(“identity”) != null) {
query = query + " and iri.identityRequest.targetId = :identity";
}

if (args.containsKey(“startDate”) && args.get(“startDate”) != null) {
query = query + " and iri.identityRequest.created >= :startDate";
}

if (args.containsKey(“endDate”) && args.get(“endDate”) != null) {
query = query + " and iri.identityRequest.created <= :endDate";
}

return query;
]]>

<![CDATA[
import java.util.HashMap;
import java.util.Iterator;

Object entObj = scriptArgs.get(“value”);
if (entObj == null) return “”;

String entValue = “”;
if (entObj instanceof java.util.List) {
java.util.List vals = (java.util.List) entObj;
if (!vals.isEmpty() && vals.get(0) != null) {
entValue = String.valueOf(vals.get(0));
}
} else {
entValue = String.valueOf(entObj);
}

String appName = scriptArgs.get(“application”) != null ? String.valueOf(scriptArgs.get(“application”)) : “”;
String attrName = scriptArgs.get(“name”) != null ? String.valueOf(scriptArgs.get(“name”)) : “”;

if (entValue.length() == 0 || appName.length() == 0 || attrName.length() == 0) {
return entValue;
}

Map args = new HashMap();
args.put(“app”, appName);
args.put(“attr”, attrName);
args.put(“val”, entValue);

Iterator it = context.search(“select ma.displayableName from sailpoint.object.ManagedAttribute ma where ma.application.name = :app and ma.attribute = :attr and ma.value = :val”, args, null);
if (it.hasNext()) {
Object r = it.next();
if (r != null) return String.valueOf(r);
}
return entValue;
]]>

Identity
Identity for whom entitlements were requested

Start Date
Request created on or after this date

End Date
Request created on or before this date

Hi @anasahmed

whats your requirement?

@anasahmed Let us know what is your requirement ?

Maybe provide some more information about your use case. Or if you are looking for the custom report guide, maybe you check the document available in the portal.

Hi @anasahmed - Can you please share the requirement and the issue you are facing?

@anasahmed we really appreciate it. If you could explain the issue in more detail, we’ll be in a better position to help you.I tried to review the XML, but it doesn’t appear to be a valid XML file. Could you please verify it and share the correct XML?

If you’re looking to create a custom HQL report, I suggest going through the following documentation:

Your shared xml is not valid. Can you please export it and share it.

Hi want to make a custom report with blue branding anyone have doc related to it or any example?

@anasahmed Please refer to the following SailPoint community post; it may help with your requirement: https://community.sailpoint.com/t5/IdentityIQ-Forum/Can-We-Modify-Colors-in-Custom-reports/m-p/7411