I added a new parameter to my SSRS report contract. Now, when attempting to use this report (From x++ code), we get the following error:
Error executing code: TSTimesheetSignOffDPContract (object), method parmProjFundingSourceRefRecId called with invalid parameters.
Stack trace
(S)\Classes\TSTimesheetSignOffDPContract\parmProjFundingSourceRefRecId
(S)\Classes\DictClass\callObject
(S)\Classes\SrsReportRunUtil\initDataContractRecursively - line 53
(S)\Classes\SrsReportRunUtil\getRdpDataContract - line 49
(S)\Classes\SrsReportRunRdlParser\createRdpContract - line 5
(S)\Classes\SrsReportRunRdlParser\parseRdl - line 17
(S)\Classes\SrsReportRunService\getRdlParser - line 10
(S)\Classes\SrsReportRunService\getReportDataContract - line 28
(S)\Classes\SrsReportRunImpl\parmReportContract - line 7
(S)\Classes\SrsReportRunController\getReportContract - line 11
(S)\Classes\SrsReportRunController\parmReportContract - line 6
(S)\Classes\VRFProjInvoiceProposalDocuFileAttach\createFileTimesheet - line 24
(S)\Classes\VRFProjInvoiceProposalDocuFileAttach\getTimesheetFiles - line 89
(S)\Classes\VRFProjInvoiceProposalDocuFileAttach\run - line 39
(S)\Classes\VRFProjInvoiceProposalDocuFileAttach\main - line 19
(S)\Classes\xMenuFunction\runServer
(C)\Classes\FormFunctionButtonControl\Clicked
(C)\Forms\ProjInvoiceProposalListPage\Designs\DesignList\VRFProjInvoiceProposalDocuFileAttach\Methods\Clicked - line 7
Here is the new method:
[
DataMemberAttribute('FundingSource')
]
public ProjFundingSourceRefId parmProjFundingSourceRefRecId(ProjFundingSourceRefId _projFundingSourceRefRecId = projFundingSourceRefRecId)
{
projFundingSourceRefRecId = _projFundingSourceRefRecId;
return projFundingSourceRefRecId;
}
The error is thrown on the 'Bold' line:
controller = new TSTimesheetSignOffController();
controller.parmReportName(#TimesheetSignOff);
controller.parmLoadFromSysLastValue(false);
controller.parmReportContract().parmPrintSettings().printMediumType(SRSPrintMediumType::File);
controller.parmReportContract().parmPrintSettings().fileFormat(SRSReportFileFormat::PDF);
controller.parmReportContract().parmPrintSettings().fileName(filename);
contract = controller.parmReportContract().parmRdpContract() as TSTimesheetSignOffDPContract;
contract.parmProjFundingSourceRefRecId(projFundingSourceRefRecId);
This works fine in a Development environment but when I did a .xpo move it did not work in the new environment.
*This post is locked for comments