web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Cannot modify default value of SSRS report parameters

(0) ShareShare
ReportReport
Posted on by 110

Hi Experts,

I have setup default value for SSRS parameter by using this prePromptModifyContract(), it works fine,

protected void prePromptModifyContract()
{

TAHN_MauNhanPhuContract subLabelContract = this.parmReportContract().parmRdpContract();
RecId recId = args.record().RecId;
InventTable inventTable = InventTable::findRecId(recId);


subLabelContract.parmManufacture(inventTable.TAHN_ManufactureCode);

// Set the report design name.
this.parmReportContract().parmReportName(ssrsReportStr(TAHN_MauNhanPhuReport, Report));


}

But when I choose another value for the Manufacture parameter, I got this issue

pastedimage1624966266981v1.png

It seems like the Parameter only accept the default value that I assigned.

Is there anyway to choose other values without getting this issue ?

Thanks in advanced

I have the same question (0)
  • Verified answer
    Muhammad Ozair Naeem Profile Picture
    272 on at

    Hi Nguyen,

    We usually use this method for adding the report design names and not setting a default value on the report. You can add a default value using the UIBuilder class. That way, the default value is only loaded once and will also allow you to change the value.

    -MON

  • Nguyen Do Huy Profile Picture
    110 on at

    Hi MON,

    Thanks for guiding me,

    Wondering if you have any references to do this.

    thanks a lot

  • Suggested answer
    Muhammad Ozair Naeem Profile Picture
    272 on at

    Hi Nguyen,

    Yes. After creating the UIBuilder class, if you don't already have it, you can look at the code below and write something similar.


    class SimpleDemoUIBuilder extends SrsReportDataContractUIBuilder
    {
        DialogField         dialogEmplId;
        SimpleDemoContract  contract;
    
        public void postBuild()
        {
            super();
    
            contract        = this.dataContractObject();
            dialogEmplId    = this.bindInfo().getDialogField(contract, methodStr(SimpleDemoContract, parmEmplId));
        
            dialogEmpId.value('Your Value Here');
        }
    }

    -MON

  • Nguyen Do Huy Profile Picture
    110 on at

    Hi all,

    I have found the issue.

    It was because of the onModified method that I overrided.

    It has to return boolean value.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Siv Sagar Profile Picture

Siv Sagar 266 Super User 2025 Season 2

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 213 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 140 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans