Automatically fill parameter of SSRS Report with Selected Data in AX

I have made a RDP SSRS Report of a Journal Voucher, that has a Journal Number Parameter.

It is working properly, but I need to add a feature that automatically fills the parameter upon selecting the Journal Number in AX (General Journal Form)


select Journal Number (ABC-00001) > Print > Voucher

the SSRS Report should have filtered the Journal Number and the output comes out with ABC-00001 data.

can someone put in a code or something for reference?


you have to use the controller class for selected record printing see the below link for clarification

Hello Xspy,

Already same thing we have in AX


@ Project management and accounting / Journal / Hour

Click on any Hour Journal > Print

Below Query range is passed @ ProjJournalTransController.setRanges()


Dear XSpy,

You need to pass these values from the controller class to the contract class, please check the Purchase requisition report classes PurchReqContract, PurchReqController and how it’s passes the RecId and RequisitionPurpose from the Controller to the contract.

Contract class:


public RequisitionPurpose parmRequisitionPurpose(RequisitionPurpose _requisitionPurpose = requisitionPurpose)


requisitionPurpose = _requisitionPurpose;

return requisitionPurpose;


Controller class:

protected void preRunModifyContract()


PurchReqContract contract;

PurchReqTableVersion purchReqTableVersion;



throw error("@SYS26348");




purchReqTableVersion = this.parmArgs().record();


if (purchReqTableVersion)


contract = this.parmReportContract().parmRdpContract() as PurchReqContract;

if (contract)









Ahmad Al-Saify