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)
ex.
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 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:
[DataMemberAttribute(‘RequisitionPurpose’)]
public RequisitionPurpose parmRequisitionPurpose(RequisitionPurpose _requisitionPurpose = requisitionPurpose)
{
requisitionPurpose = _requisitionPurpose;
return requisitionPurpose;
}
Controller class:
protected void preRunModifyContract()
{
PurchReqContract contract;
PurchReqTableVersion purchReqTableVersion;
if(!this.parmArgs().record())
{
throw error("@SYS26348");
}
else
{
purchReqTableVersion = this.parmArgs().record();
}
if (purchReqTableVersion)
{
contract = this.parmReportContract().parmRdpContract() as PurchReqContract;