To Add sunrise/sunset date (if requested) columns to OOTB "Access Request Status Report"

Using 8.3p3 version of IIQ.

How to add sunrise/sunset date (if requested) columns to OOTB “Access Request Status Report”?

Thanks

Hi @MeghaB - The Access Request Status Report is a Java data source report, so you cannot add columns to it. You would need to create a custom report with this functionality.

<DataSource dataSourceClass="sailpoint.reporting.datasource.LcmIdentityRequestStatusJavaDataSource" objectType="sailpoint.object.IdentityRequestItem" type="Java"/>

Hi @ryan_toornburg,

I would suggest starting by extending the following class.

Here is a basic example — not fully functional — but I believe it demonstrates the general approach you can take to achieve your goal:


import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRField;
import sailpoint.api.SailPointContext;
import sailpoint.object.Attributes;
import sailpoint.object.IdentityRequest;
import sailpoint.object.LiveReport;
import sailpoint.object.Sort;
import sailpoint.reporting.datasource.JavaDataSource;
import sailpoint.reporting.datasource.LcmIdentityRequestStatusJavaDataSource;
import sailpoint.tools.GeneralException;

import java.util.List;

public class CustomLcmRequestStatusDataSource extends LcmIdentityRequestStatusJavaDataSource implements JavaDataSource {

    public CustomLcmRequestStatusDataSource() {
        super();
    }

    @Override
    public void initialize(SailPointContext context, LiveReport report,
                           Attributes<String, Object> arguments, String groupBy,
                           List<Sort> sort) throws GeneralException {
        super.initialize(context, report, arguments, groupBy, sort);
     ... add your logic here that extends the returned object within getFieldValue
    }

    @Override
    public Object getFieldValue(JRField field) throws JRException {
        String fieldName = field.getName();

        if ("sunrise".equals(fieldName)) {
            IdentityRequest request = (IdentityRequest) getCurrentObject();
            return request.getAttribute("sunrise"); 
        } else if ("sunset".equals(fieldName)) {
            IdentityRequest request = (IdentityRequest) getCurrentObject();
            return request.getAttribute("sunset");
        }

        return super.getFieldValue(field);
    }
}

Of course, this is not a complete solution, but it should give you a solid starting point for implementing the required changes.

@MeghaB - See Adam’s reply for the framework