SSRS : RDP class & Debug it


Below is the sample code for developing RDP class for SSRS reports

[SRSReportQueryAttribute (querystr(HcmWorkerListPage_Perment)), //My Query

SRSReportParameterAttribute(classStr(SrsRDPContractIndemnity))] //class name

1) class IndemnityRDP extends SRSReportDataProviderBase


MZK_PayrollIndemnityTmp        tmpPayrollIndemnity;

Mzk_PayrollIndemnityonly       payrollIndemnityonlycls;



[SRSReportDataSetAttribute(“MZK_PayrollIndemnityTmp”)] //tmp table

Public MZK_PayrollIndemnityTmp getDate()


select * from tmpPayrollIndemnity;

return tmpPayrollIndemnity;




public void processReport()


QueryRun                    queryRun;

Query                       query;

    SrsRdpContractIndemnity  dataContract;

QueryBuildRange             qbrHcmWorker;

QueryBuildRange             qbrJourTrans;

StartDate                   tillDate;

QueryBuildDataSource          qbsHcmworker;

HcmWorker                   getHcmworker;

// Get the query from the runtime using a dynamic query.

query = this.parmQuery();

// Get the parameters passed from runtime.

dataContract    = this.parmDataContract();

tillDate = dataContract.asOfDate();

// Add parameters to the query.

qbsHcmworker = query.dataSourceTable(tablenum(HcmWorker));



qbrHcmWorker = qbsHcmworker.findRange(fieldnum(HcmWorker, NewHcmEmployeeType));

// If an invent JournalId has not been set, then use the parameter value to set it.




// Run the query with modified ranges.

queryRun    = new QueryRun(query);


while (


getHcmworker = queryRun.get(tableNum(HcmWorker));

this.insertTmpTable(getHcmworker, tillDate);





private void insertTmpTable(HcmWorker _hcmWorker,

StartDate  _tilldate=today())


HcmPayrollLine      hcmPayrollLline;

HcmEmployment       hcmEmployment;

utcDateTime         joinDateTime;

date                joinDate;


payrollIndemnityonlycls = new Mzk_PayrollIndemnityonly();

tmpPayrollIndemnity.Worker                  =   _hcmWorker.RecId;

tmpPayrollIndemnity.NewHcmEmployeeType      =   _hcmWorker.NewHcmEmployeeType;

tmpPayrollIndemnity.CitizenshipCountryRegion=   _hcmWorker.Nationality();

tmpPayrollIndemnity.Joindate                =   _hcmWorker.Joindate();

tmpPayrollIndemnity.Tilldate                =   _tilldate;

tmpPayrollIndemnity.Name                    =;

tmpPayrollIndemnity.Service                 =   (_tilldate – tmpPayrollIndemnity.Joindate)/365;

joinDateTime = DateTimeUtil::applyTimeZoneOffset(    hcmEmployment::findByWorker(_hcmWorker.RecId).ValidFrom, DateTimeUtil::getUserPreferredTimeZone());

joindate = any2date(joinDateTime);

tmpPayrollIndemnity.Indemnity   =   payrollIndemnityonlycls.payrollGeneration(_hcmWorker.RecId,joindate,_tilldate);



Debug code for RDP:

static void SSRS_RDPclsDEBUG(Args _args)


//MachineBreakDownSlipTmp ACWATransferhistoryTmp;

MZK_PayrollIndemnityTmp payrollIndemnityTmp;

IndemnityRDP dataprovider = new IndemnityRDP();

//MachineBreakDownSlip_queryDP dataprovider = new MachineBreakDownSlip_queryDP();


payrollIndemnityTmp = dataProvider.getDate();



2 thoughts on “SSRS : RDP class & Debug it

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s