In Report, Why I am not able to print properties value during making it custom

When I am trying to read the properties values, my code is not executed during customization of the report (access request status report). Anyone help why my single line of code not work inside RenderScript?

Please suggest how I can get the properties value. so that I can modify column on that basis.

------------
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE TaskDefinition PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<TaskDefinition created="1631876302095" executor="sailpoint.reporting.LiveReportExecutor" id="0aaa16877bf316de817bf368450f033d" modified="1681401802297" name="Access Request Status Report" progressMode="Percentage" resultAction="Rename" subType="Lifecycle Manager Reports" template="true" type="LiveReport">
  <Attributes>
    <Map>
      <entry key="auditEventTypes">
        <value>
          <List>
            <String>AccessRequest</String>
            <String>EntitlementsRequest</String>
            <String>RolesRequest</String>
          </List>
        </value>
      </entry>
      <entry key="report">
        <value>
          <LiveReport title="Access Request Status Report">
            <Chart title="rept_lcm_access_request_chart_title" type="pie">
              <Script>
                <Source>
                             
                                import sailpoint.object.*;
                                import java.util.*;

                                List data = new ArrayList();

                                QueryOptions approvalStateOps = new QueryOptions(baseQueryOptions);
                                Filter filter = Filter.and( Filter.notnull("approvalState"),
                                    Filter.ne("identityRequest.executionStatus", IdentityRequest.ExecutionStatus.Terminated));

                                approvalStateOps.addFilter(filter);
                                approvalStateOps.addGroupBy("approvalState");

                                List fields = new ArrayList();
                                fields.add("count(*)");
                                fields.add("approvalState");

                                Iterator iter = context.search(IdentityRequestItem.class, approvalStateOps, fields);
                                while (iter.hasNext()){
                                    Object[] row = iter.next();
                                    Map val = new HashMap();
                                    val.put("category", row[1].toString());
                                    val.put("value", row[0]);
                                    data.add(val);
                                }

                                QueryOptions terminatedStateOps = new QueryOptions(baseQueryOptions);
                                filter = Filter.and( Filter.notnull("approvalState"),
                                    Filter.eq("identityRequest.executionStatus", IdentityRequest.ExecutionStatus.Terminated));
                                terminatedStateOps.addFilter(filter);

                                int terminatedCount = context.countObjects(IdentityRequestItem.class, terminatedStateOps);
                                if (terminatedCount > 0) {
                                    Map val = new HashMap();
                                    val.put("category", "identity_request_terminated");
                                    val.put("value", terminatedCount);
                                    data.add(val);
                                }

                                QueryOptions requestStateOps = new QueryOptions(baseQueryOptions);
                                requestStateOps.addFilter(Filter.isnull("approvalState"));
                                requestStateOps.addGroupBy("identityRequest.completionStatus");

                                fields = new ArrayList();
                                fields.add("count(*)");
                                fields.add("identityRequest.completionStatus");

                                iter = context.search(IdentityRequestItem.class, requestStateOps, fields);
                                while (iter.hasNext()){
                                    Object[] row = iter.next();
                                    Map val = new HashMap();
                                    if( IdentityRequest.CompletionStatus.Success.equals(row[1])) {
                                        val.put("category", "rept_lcm_request_status_col_status_pending_provision");
                                    } else {
                                        val.put("category", "rept_lcm_request_status_col_status_pending_completion");
                                    }

                                    val.put("value", row[0]);
                                    data.add(val);
                                }

                                return data;
                              
                           </Source>
              </Script>
            </Chart>
            <DataSource dataSourceClass="sailpoint.reporting.datasource.LcmIdentityRequestStatusJavaDataSource" objectType="sailpoint.object.IdentityRequestItem" type="Java"/>
            <ReportForm>
              <Reference class="sailpoint.object.Form" id="0aaa16877bf316de817bf36844870337" name="Access Request Status Form"/>
            </ReportForm>
            <Columns>
			
			**//My custom code::::**
			
              <ReportColumnConfig field="requestId" header="rept_lcm_request_status_col_request_id" property="requestId" sortable="true" valueClass="java.lang.String" width="110"/>
			  
			  
			 <RenderScript>
                  <Source>
                    System.out.println("2");
                    import java.util.*;
                    import sailpoint.object.*;
                    import sailpoint.api.SailPointContext;
                    import sailpoint.tools.GeneralException;
                    import sailpoint.object.QueryOptions;
                    import sailpoint.object.Filter;
					
					
				 System.out.println("2valuestring:: "+value);
                   

                  </Source>
                </RenderScript>
              </ReportColumnConfig>
			  
			  
			  
              <ReportColumnConfig field="requester" header="rept_lcm_request_status_col_requester" property="requester" sortable="true" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="requestedFor" header="rept_lcm_request_status_col_requested_for" property="requestedFor" sortable="true" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="owner" header="rept_lcm_request_status_col_owner" property="owner" sortable="true" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="created" header="rept_lcm_request_status_col_request_date" property="created" sortable="true" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="operation" header="rept_lcm_request_status_col_operation" property="operation" sortable="true" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="application" header="rept_lcm_request_status_col_app" property="application" sortable="true" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="account" header="rept_lcm_request_status_col_account" property="account" sortable="true" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="attribute" header="rept_lcm_request_status_col_entitlement" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="attributeValue" header="rept_lcm_request_status_col_entitlement_value" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="description" header="rept_lcm_request_status_col_entitlement_description" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="approvers" header="rept_lcm_request_status_col_approver" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="rejecters" header="rept_lcm_request_status_col_rejecter" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="status" header="rept_lcm_request_status_col_status" property="status" sortable="true" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig dateFormat="short" field="completionDateString" header="rept_lcm_request_status_col_completion_date" property="completionDateString" sortable="true" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="requestorComments" header="rept_lcm_request_status_col_requester_comments" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="workItemComments" header="rept_lcm_request_status_col_work_item_comments" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="completionComments" header="rept_lcm_request_status_col_completion_comments" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="attachmentsCount" header="rept_lcm_request_status_col_attachments_count" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="recommendation" header="rept_lcm_request_status_col_recommendation" property="recommendation" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="recommendationReasons" header="rept_lcm_request_status_col_recommendation_reasons" property="recommendationReasons" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="recommendationTimestamp" header="rept_lcm_request_status_col_recommendation_timestamp" property="recommendationTimestamp" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="classificationNames" header="rept_lcm_request_status_col_classifications" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="accessRecommendation" header="rept_col_access_request_recommendation" property="accessRecommendation" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="accessRecommendationReasons" header="rept_col_access_request_recommendation_reasons" property="accessRecommendationReasons" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="accessRecommendationTimestamp" header="rept_col_access_request_recommendation_timestamp" property="accessRecommendationTimestamp" valueClass="java.lang.String" width="110"/>
              <ReportColumnConfig field="iiqElevatedAccess" header="rept_lcm_request_status_col_iiq_elevated_access" property="iiqElevatedAccess" sortable="true" valueClass="java.lang.String" width="110"/>
            </Columns>
          </LiveReport>
        </value>
      </entry>
      <entry key="reportTitle" value="rept_lcm_entitlement_request_status_title"/>
    </Map>
  </Attributes>
  <Description>Displays information about access requests from LCM in detailed format.</Description>
  <RequiredRights>
    <Reference class="sailpoint.object.SPRight" id="0aaa16877bf316de817bf36736620059" name="FullAccessEntitlementRequestStatusReport"/>
  </RequiredRights>
  <Signature>
    <Inputs>
      <Argument multi="true" name="applications" type="Application">
        <Description>rept_input_lcm_request_status_report_apps</Description>
      </Argument>
      <Argument multi="true" name="approvers" type="Identity">
        <Description>rept_input_lcm_request_status_report_approver</Description>
      </Argument>
      <Argument multi="true" name="requestors" type="Identity">
        <Description>rept_input_lcm_request_status_report_requester</Description>
      </Argument>
      <Argument multi="true" name="entitlements" type="sailpoint.object.IdentityItem">
        <Description>rept_input_lcm_request_status_report_entitlements</Description>
      </Argument>
      <Argument multi="true" name="roles" type="Role">
        <Description>rept_input_lcm_request_status_report_roles</Description>
      </Argument>
      <Argument multi="true" name="targetIdentities" type="Identity">
        <Description>rept_input_lcm_request_status_report_target_identity</Description>
      </Argument>
      <Argument name="status" type="string">
        <Description>rept_input_lcm_request_status_report_status</Description>
      </Argument>
      <Argument name="requestDateRange" type="daterange">
        <Description>rept_input_lcm_request_status_report_status</Description>
      </Argument>
      <Argument name="completionDateRange" type="daterange">
        <Description>rept_input_lcm_request_status_report_status</Description>
      </Argument>
    </Inputs>
  </Signature>
</TaskDefinition>

------
------

Hi @amanKsingh,

in this line you are closing ReportColumnConfig tag, delete the “/” at end and try again

I forget to remove here, but in my actual code it is not present.

Internal - General Use

'The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. ’

I tried in SP sandbox and I have the same problem and I dont understand.

I found some topic in the community without solution and I dont find anything in documentation can block this. I but something is wrong because if I change the property nothing change.

I think the only solution is using the extedendcolumunconfig

i see ReportColumnConfig is already closed at the end with “/”, can you please remove that and try?

is not this the problem…unlucky

Just saw your response. Sorry for the confusion.

np, really I tried some configuration and never time exucete the code of the script, I dont know if the problem is th SP sandbox.

Some time ago, I tried to modify a LiveReport and I had the same problem and I used the extedendcolumunconfig. Its so strange

Maybe is this:

It says “If the value returned from the query needs to be manipulated”, maybe in report we can only change data from query.

Tomorrow I will try to use a HQL query

Its strange, i just tried running rendrerScript in ReportColumnConfig, report runs successfully but script did not get executed.

Hi all,

Can anyone help on this?

try with extedendcolumunconfig or change the data source with a hql query

1 Like

task.xml (12.9 KB)
I found this, is my old taskdefinition but it worked.

maybe you can change this

2 Likes

@amanKsingh did you try with my template?

It is most likely because this is a Java DataSource. The class behind the report generates the specific columns that are returned. You typically can only add columns with render scripts in Filter DataSource reports.

2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.