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

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

add validation like From date & To date in Contract class

(0) ShareShare
ReportReport
Posted on by 30

Hi

How will add validation like From date & To date in Contract class in SSRS report? Generally,  will add in Controller class.

Please give me more shed on this 

I have the same question (0)
  • Blue Wang Profile Picture
    Microsoft Employee on at

    Hi @rp@n,

    For RDL data contracts, the SrsReportRdlDataContract class implements default validation that will do basic parameter validation.

    For RDP data contracts, implement the validate method and return True or False to indicate whether the parameter is valid. It is required to attach the DataContractAttribute attribute.

    Please read this doc: docs.microsoft.com/.../how-to-add-validation-to-a-data-contract-class

  • Suggested answer
    vinitgoyal2005 Profile Picture
    6,332 on at

    Hi Arpan,

    Your contact class needs to implement 'SysOperationValidatable' and implement the Validate method. You can find a reference for this class in AOT to get an example.

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Arpan,

    You can check the validate method in InventAgingContract class. It implements SysOperationValidatable as Vinit mentioned. This class also has a validation of from and to dates that you can follow.

  • @rp@n Profile Picture
    30 on at

    Thanks all

  • @rp@n Profile Picture
    30 on at

    Is there any difference between validation controller class and contract class?

    Kindly elaborate please

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Do you mean that you want to validate in the controller class rather than in the contract class?

  • Blue Wang Profile Picture
    Microsoft Employee on at

    HI,

    114.PNG115.PNG

    116.PNG

  • @rp@n Profile Picture
    30 on at

    Yes Gunjan

    When to recommended to put validation in Contract class instead of Controller class.

    Is there any benefit?

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Arpan,

    All the parameter validations must be in the contract class only. This way the warnings will be thrown on the parameter form only and can be corrected by the user without closing/re-opening the form.

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 692 Super User 2026 Season 1

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 280 Super User 2026 Season 1

#3
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 244

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans