Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Unanswered

Parameter InventVersionId does not exist. in my report

(1) ShareShare
ReportReport
Posted on by 253
Hi All,
 
I would like to request some favor for all of you to review my error 
I try to check a existing code about the customize report then I got an error Parameter InventVersionId does not exist. Can someone guide me?
 
------------------------------------
a Step that I check in this below.
------------------------------------
 
then I check on this form about the menu to access I know this meu is HSTHInventJournalTrans(Customization)
 
After that I check this output Menu. this menu call class HSTHInventjournaltransController
 
For this class call report /HSTHInventJournalTrans/ and ParmAgrs
 
and code for this session(/HSTHInventJournalTrans/) is
-------------------------------------------------------
/// <summary>
///    The <c>InventJournalTransController</c> class is the helper class for the <c>InventJournalTrans</c>
///    report.
/// </summary>
#isoCountryRegionCodes
public class HSTHInventJournalTransController extends SrsReportRunController
{
    private const str ParameterShowLog = 'ShowLog';
    private const str ISOCode = 'ISOCode';
    private void hideParameters(container _parameters)
    {
        SysOperationDataContractInfo    rdpInfo;
        int                             conIdx, conLng = conLen(_parameters);
        void hideParameter(str _parameterName)
        {
            SrsReportRdpDataMemberInfo memberInfo       = rdpInfo.getMembers().lookup(_parameterName);
            SrsReportDesignProperties  reportProperties = memberInfo as SrsReportDesignProperties;
            if (reportProperties)
            {
                reportProperties.parmHidden(true);
            }
        }
        if (! conLng)
        {
            return;
        }
        SysOperationDataContractInfo wrapperInfo = this.getDataContractInfoObjectsRecursively().lookup(classStr(SrsReportRdpRdlWrapperContract));
        rdpInfo = wrapperInfo.getMemberObjectInfo(this.parmReportContract().parmRdpContract());
        for (conIdx = 1; conIdx <= conLng; conIdx ++)
        {
            hideParameter(conPeek(_parameters, conIdx));
        }
    }
    private void hideParameters_RU()
    {
        SrsReportRdlDataContract rdlContract = this.parmReportContract().parmRdlContract();
        void hideParameterBoolean(str _parmName)
        {
            SRSReportParameter parm = rdlContract.getParameter(_parmName);
            if (!parm)
                return;
            parm.setValueTyped(false);
            parm.hidden(true);
        }
        hideParameterBoolean(fieldStr(InventDim, InventGtdId_RU));
        hideParameterBoolean(fieldStr(InventDim, InventProfileId_RU));
    }
    /// <summary>
    /// Provides the ability to modify the report contract before the dialog box is displayed to the user.
    /// </summary>
    /// <remarks>
    /// Use this method to change the report contract. A common use case for this method is to add or to
    /// change a query. It is important to notice that this method is called only during an interactive
    /// scenario, before rendering the UI to user.For a batch scenario, we do not start this method because
    /// there is no user interaction and the contract values are already saved in the batch.Do not
    /// instantiate any instance variables in this code if they are used during the lifetime of the
    /// controller because these will fail in batch cases.
    /// </remarks>
    public void prePromptModifyContract()
    {
        // <GEERU>
        if (!SysCountryRegionCode::isLegalEntityInCountryRegion([ #isoRU ]))
        {
            this.hideParameters_RU();
        }
        // </GEERU>
        this.setRanges(this.parmReportContract().parmQueryContracts().lookup(this.getFirstQueryContractKey()));
    }
    /// <summary>
    /// Changes the report contract before it runs the report.
    /// </summary>
    public void preRunModifyContract()
    {
        boolean showLog = false;
        showLog = this.parmReportContract().parmRdlContract().getParameter(ParameterShowLog).getValueTyped();
        this.processReportParameters(this.parmReportContract().parmQueryContracts().lookup(this.getFirstQueryContractKey()),
            showLog);
        // <GEERU>
        this.parmReportContract().parmRdlContract().getParameter(ISOCode).setValueTyped(SysCountryRegionCode::countryInfo());
        // </GEERU>
    }
    /// <summary>
    ///    Disables or enables the <c>JournalError</c> table, depending on the print log parameter.
    /// </summary>
    /// <param name=/_query/>
    ///    The <c>Query</c> parameter object of the report.
    /// </param>
    /// <param name=/_showLog/>
    ///    A Boolean value that specifies whether to show the error log on the report.
    /// </param>
    /// <remarks>
    ///    Disables or enables the <c>JournalError</c> table.
    /// </remarks>
    public void processReportParameters(Query _query, boolean _showLog)
    {
        _query.dataSourceTable(tableNum(JournalError)).enabled(_showLog);
    }
    /// <summary>
    ///    Sets the report query ranges based on the caller.
    /// </summary>
    /// <param name=/_query/>
    ///    The hold the <c>Query</c> object of the report.
    /// </param>
    /// <remarks>
    ///    Assigns values to the journal ID and journal type range.
    /// </remarks>
    public void setRanges(Query _query)
    {
        InventJournalTable      inventJournalTable;
        if (this.parmArgs().caller())
        {
            if (! this.parmArgs().record().RecId)
            {
                throw error(strFmt(/@SYS22338/,funcName()));
            }
            if (this.parmArgs().dataset() == tableNum(InventJournalTable ))
            {
                inventJournalTable  = this.parmArgs().record();
            }
            else
            {
                throw error(strFmt(/@SYS23396/,funcName()));
            }
        }
        if (inventJournalTable.JournalId)
        {
            if (_query)
            {
                QueryBuildDataSource qbds = _query.dataSourceTable(tableNum(InventJournalTrans));
                SysQuery::findOrCreateRange(qbds, fieldNum(InventJournalTrans, JournalId)).value(inventJournalTable.JournalId);
                SysQuery::findOrCreateRange(qbds, fieldNum(InventJournalTrans, JournalType)).value(queryValue(enum2str(inventJournalTable.JournalType)));
            }
        }
    }
    public static void main(Args _args)
    {
        InventJournalTransController    controller          = new InventJournalTransController();
        SRSReportParameter              parameterPrintlog   = new SRSReportParameter();
        controller.parmReportName(ssrsReportStr(HSTHInventJournalTrans, Report));
        controller.parmArgs(_args);
        controller.startOperation();
    }
}
-------------------------------------------------------
 
Finally when I check report I didn't see Parameter InventVersionId
 
 
 
  • Suggested answer
    Nathanael.tetouom Profile Picture
    62 on at
    Parameter InventVersionId does not exist. in my report
    Hi,
     
    You might need to check 'InventVersionId' field under Inventdim node in your dataset query definition : 
     
     
     

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics

Product updates

Dynamics 365 release plans