Notifications
Announcements
No record found.
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
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
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.
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.
Thanks all
Is there any difference between validation controller class and contract class?
Kindly elaborate please
Do you mean that you want to validate in the controller class rather than in the contract class?
HI,
Yes Gunjan
When to recommended to put validation in Contract class instead of Controller class.
Is there any benefit?
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 451 Most Valuable Professional
André Arnaud de Cal... 428 Super User 2025 Season 2
BillurSamdancioglu 239 Most Valuable Professional