Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

Populate the Date Field Parameters based on another field.

Posted on by 45

Hi all,

I am developing a SSRS Report, I am using Four Parameters on which the report will be generated, Contract Id, Journal Id, Fromdate and Todate.

When i will select any Journal ID, then the from date and to date should be auto populated based on the from date and the to date of the particular Journal. The Fromdate and Todate are read only fields and should only be auto-populated based on the date of the Journal. 

I searched but all the posts are related to auto population of dates based on other dates only.

Can anyone provide my any idea or solution how to get it.

Any help will be appreciated.

  • Deeksha singh Profile Picture
    Deeksha singh 45 on at
    RE: Populate the Date Field Parameters based on another field.

    Hi Gunjan,

    Thank you, it worked.

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: Populate the Date Field Parameters based on another field.

    Hi Deeksha,

    You can set the values as well. Set the dialogField values like this (in the UI builder) -

    private void modifyDialogFields()
    {
        df_FromDate.value(fromDate);
        df_FromDate.value(toDate);
    }

  • Deeksha singh Profile Picture
    Deeksha singh 45 on at
    RE: Populate the Date Field Parameters based on another field.

    Hi Blue wang,

    I created a Ui builder class for it and linked it to my data contract class as the other two parameters are having value in lookup and the value which will be selected from the journalid lookup, that journal from date and to date should get populated in the fromDate and ToDate Parameter fields. I am not able to achieve that using the above post.

  • Deeksha singh Profile Picture
    Deeksha singh 45 on at
    RE: Populate the Date Field Parameters based on another field.

    Hi,

    Thanks for the quick reply, but the methods which are used in the post which you shared are giving permission to modify other fields, i need to populate my date fields fromdate and todate based on the journal which i choose from the lookup parameter.

  • Blue Wang Profile Picture
    Blue Wang on at
    RE: Populate the Date Field Parameters based on another field.

    Hi Deeksha singh,

    You do need to implement the uibuilder class, and link it to your data contract by SysOperationContractProcessingAttribute.

    Please check this: community.dynamics.com/.../ssrs-report---field-modified-method

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: Populate the Date Field Parameters based on another field.

    Hi Deeksha,

    You will need to implement a UI builder class as well. You might be able to try something like what's done in this post

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans