Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

New 'parm' added to report Contract now causes error

(0) ShareShare
ReportReport
Posted on by 3,087

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

  • Suggested answer
    RE: New 'parm' added to report Contract now causes error

    Clear the caches By Tools -> caches ->Refresh report server,and Refresh the dataset in the report, deploy the report

    Hope this help

    Thanks

    Aravind E

  • Verified answer
    b_radlyjames Profile Picture
    b_radlyjames 3,087 on at
    RE: New 'parm' added to report Contract now causes error

    Fairly simple fix here:

    1. Full CIL

    2. Refresh the data set on the report.

    3. Deploy report

    Everything working great.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,399 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans