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 :

Initializing dialog field values on SSRS report in D365FO

Chaitanya Golla Profile Picture Chaitanya Golla 17,225

Hi,

Please refer to my earlier post to view the report SSRSPrecisionDesign related classes, tables and menu Item.

https://community.dynamics.com/365/financeandoperations/b/daxology/posts/creating-a-simple-report-in-d365fo

Custom Tables: SampleTable and SampleTrans

In this post, we will see how to provide current date as default values to dialog fields start date and end date on report dialog.  

Step 1: Contract SSRSReportContract is modified such that it implements interface SysOperationInitializable

class SSRSReportContract implements SysOperationInitializable

Step 2: To provide the current date as default to the report parameters StartDate and EndDate  are given under the new method initialize.

/// <summary>
/// Initailizes the default values to parameters.
/// </summary>
public void initialize()
{
this.parmStartDate(DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone()));
this.parmEndDate(DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone()));
}

Step 3: Built the solution and current date is appeared as default on both the dialog fields.

Report Dialog

Regards,

Chaitanya Golla

Comments

*This post is locked for comments