how to add current date and time and pagenumber in SSRS report

 1.To add current date and time in report use the follwing code


now =Format(Now(), "MM/dd/yyyy hh:mm tt")


To add total number of pages after the page number use the following code


="Page "&Globals!PageNumber &" of "&Globals!TotalPages


To print date:


Format(Now, "dd/MM/yyyy")


To print time:


Format(Now, "hh:mm tt")


To print datetime use the following code:


=Format(Now, "dd/MM/yyyy") & vbCrLf & Format(Now, "hh:mm tt")


To print time depends on different time zones use the following code:


=Microsoft.Dynamics.Framework.Reports.DataMethodUtility.ConvertUtcToAxUserTimeZoneForUser(Parameters!AX_CompanyName.Value, Parameters!AX_UserContext.Value, System.DateTime.UtcNow, "d", Parameters!AX_RenderingCulture.Value) & vbCrLf & Microsoft.Dynamics.Framework.Reports.DataMethodUtility.ConvertUtcToAxUserTimeZoneForUser(Parameters!AX_CompanyName.Value, Parameters!AX_UserContext.Value, System.DateTime.UtcNow, "t", Parameters!AX_RenderingCulture.Value)


use strUpr() method to convert small case letters into uppercase letters.

Comments

Popular posts from this blog

how to post trade agreement journals automatically using x++ code

How to Create a wizard in x++ d365

x++ code to submit and approve and reject the invent movement workflow in d365 F&O