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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

how can change text of label from code

(0) ShareShare
ReportReport
Posted on by 2,050

i have lable name total 

and i want change text of that label from code but i can't

my lable name (TotalsOf) i used this code and stil getting error any idea

real  percn=0;
percn=(5 * 9);
TotalsOf.text=real2str(percn);


*This post is locked for comments

I have the same question (0)
  • Sohaib Cheema Profile Picture
    49,679 Super User 2026 Season 1 on at

    do you want to change label runtime only or permanently?

    moreover let us know if this a form control or SSRS control or something else?

  • mohammed.mqi Profile Picture
    2,050 on at

    runtime

    i want add lable fpr total on this form (EcoResProductCreate)

    as you see here

    0724.111.PNG

    i aready have code of total but i want pass value to that lable

  • Verified answer
    Sohaib Cheema Profile Picture
    49,679 Super User 2026 Season 1 on at

    Thank you for providing some description. please make use of num2Sr function. given example below

    StaticTextCntrolName.text(num2str(100.23,1,2,1,2));

    Please note that nothing should stop you from using Real control, usually.

  • mohammed.mqi Profile Picture
    2,050 on at

    thanks for replay

    i got this error

    (The wrong number of arguments has been specified for the method.)

    as you see i'm using a variable call (percn) in my code and still i have that error

  • Verified answer
    Sohaib Cheema Profile Picture
    49,679 Super User 2026 Season 1 on at

    provide all 5 parameters as required

    https://msdn.microsoft.com/en-us/library/aa866120.aspx

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans