Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

SSRS report issue.

(0) ShareShare
ReportReport
Posted on by 2

Hello All Experts,

can anyone let me know what is wrong in the below formula.

=IIf(DateAdd("d",Fields!new_durationdays.Value,Fields!new_startdate.Value).Date > ("31/Dec/2018"),
(IIF(IsNothing(Fields!new_startdate.Value), 0, DateDiff(DateInterval.Day, Fields!new_startdate.Value, CDate("31/Dec/2018"))))

if not wrong then why data is not being displayed.

*This post is locked for comments

  • EmployeeOcta Profile Picture
    EmployeeOcta 2 on at
    RE: SSRS report issue.

    Hello All Experts,

    I want to achieve the functionality as below.

    Scenario 1.

    if new_startdate value is starting from 1st December 2017 and duration is 60 days then from December 2017 it will go to January 2018.

    i want to take duration which are starting from January 2018 till December 2018 end.

    Scenario 2.

    If new_startdate  value is begining from january 2018 ad as per duration getting end in 2019 the ignore the 2019 duration and only consider the 2018 December values.

    How can i fit this requirement in above formula.

  • Suggested answer
    MartinOmidvar Profile Picture
    MartinOmidvar 101 on at
    RE: SSRS report issue.

    To find out what happen to your code you can go step by step.

    1- Check out if this statemente: " =DateAdd("d",Fields!new_durationdays.Value,Fields!new_startdate.Value).Date " give you the correct value that you are compare.

    2- Check the date format that you see with the date format that you have.

    3- Check this part alone: " =DateDiff(DateInterval.Day, Fields!new_startdate.Value, CDate("31/Dec/2018")) "

    I hope you can fine the solution with this guid. 

    Good luck

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,432 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans