Wednesday, November 12, 2014

MS CRM - SSRS Reports Display Values in Footer - CRM User Name , Execution Time, Page Number

Current CRM User Name

1.Create a dataset & use the below query

SELECT     fullname
FROM         FilteredSystemUser
WHERE     (systemuserid = dbo.fn_FindUserGuid())

2. use the below expression for textbox in Footer

= "Prepared by " & First(Fields!fullname.Value, "DataSet2")

Execution Time

=Globals!ExecutionTime

=Format(Globals!ExecutionTime, "dd/MM/yyyy hh:mm:ss tt")

Page Number

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

Tuesday, November 11, 2014

MS CRM -SSRS Date Parameter - Set dafault Value First Day & Last day of Last Month

Date From: (previous month first day)


=DateSerial(Year(Now), Month(Now), "1").AddMonths(-1)

 

Date To : (previous month last day)

=DateSerial(Year(Now), Month(Now), "1").AddDays(-1)

 

Reference:

http://stackoverflow.com/questions/7842877/first-and-last-day-of-current-month