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 :
Microsoft Dynamics CRM (Archived)

How to define filter condition in ssrs report?

(0) ShareShare
ReportReport
Posted on by 160

I want to show in SSRS report.

In case entity :

1: "deadline" field = todaydate it will show red.

2: "deadline" field > todaydate it will show yellow.

3: "deadline" field < todaydate it will show Green.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Gopalan Bhuvanesh Profile Picture
    11,401 on at

    Hi

    If you want to set colors according to the column value, please follow this:

    stackoverflow.com/.../ssrs-field-expression-to-change-the-background-color-of-the-cell

  • ggghj Profile Picture
    160 on at

    Hi,

    Thanks for your answer, but I applied this in "color" field properties and which is working fine.

    Find below code which I used

    =switch(Fields!oa_deadline.Value < Today() ,"red", Fields!oa_deadline.Value > Today() ,"green" , Fields!oa_deadline.Value > Today() ,"yellow")

  • ggghj Profile Picture
    160 on at

    Can anyone tell me how to color complete row?

  • Gopalan Bhuvanesh Profile Picture
    11,401 on at

    Hi

    In the design view select the details row (not header). To select the row, Click the small square cell in the first column.

    Press F4, or manually open the properties for row.

    Please apply the same above expression (switch), for the BackgroundColor property.

  • ggghj Profile Picture
    160 on at

    it works on condition about "deadline" field.

    I think it is not possible

    Kindly share me if u tried.

  • Gopalan Bhuvanesh Profile Picture
    11,401 on at

    --I think it is not possible

    What is not possible?

    Please share your screenshot, where you have applied the expression.

  • ggghj Profile Picture
    160 on at

    Thanks it's done.

    Can you please tell me the logic , how to give same color of 3 consecutive dates(previous day, current date,after day)

    1: "deadline" field = todaydate,1 day previous todaydate, oneday after todaydate it will show red.

  • Gopalan Bhuvanesh Profile Picture
    11,401 on at

    Please mark as Verified, when you found the answers helpful, so that it would help others.

  • Suggested answer
    Gopalan Bhuvanesh Profile Picture
    11,401 on at

    You need to use Date functions similar to the following:

    =DateAdd(DateInterval.Day,DateDiff(DateInterval.Year,CDate("01/01/1900"),Now()),CDate("01/01/1900"))

    please refer the following link for DateAdd functions:

    https://docs.microsoft.com/en-us/sql/reporting-services/report-design/expression-examples-report-builder-and-ssrs

  • Suggested answer
    Gopalan Bhuvanesh Profile Picture
    11,401 on at

    Please try this, I just typed here so please check for the right syntax,

    =switch(Fields!oa_deadline.Value = DateAdd(DateInterval.Day, 1, Today()) ,"red", Fields!oa_deadline.Value = Today() ,"red" , Fields!oa_deadline.Value = DateAdd(DateInterval.Day, -1, Today()) ,"red")

    You can modify the same with IIF with OR

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans