web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Color the column based on previous and current value in SSRS report

(0) ShareShare
ReportReport
Posted on by

Hello Folks,

I have a challenge in achieving the following task

I have a SSRS report developed using RDP class. I need to color one of the column based on the field value of previous record and current record. I am new to SSRS reports, any help would be highly appreciated.

Please see the below image of the report, i need to compare the value of style id column(highlighted with red) and if there is a same value for style id in the next record, then Logo1 fields should be colored ( for both the records, highlighted with blue ink)

PacHold.PNG

Thanks in Advance.

Have a Great Day!

*This post is locked for comments

I have the same question (0)
  • Douglas Noel Profile Picture
    3,907 on at

    Hi,

    can't you use a expression based on  comparing the current against the previous row?

    stackoverflow.com/.../ssrs-comparing-current-row-to-previous-row

    Regards Douglas

  • Community Member Profile Picture
    on at

    Hello Douglas,

    Thanks for your response, using the Previous() can I also color the previous record column or only the current record column ?

  • Verified answer
    Douglas Noel Profile Picture
    3,907 on at

    Damned,

    for sure, it will work only for the current row.

    Due to the lack of the opposite next function, and use some combination of both, maybe another possible way is creating a flag in the records during creation of the temptable data during creation, considering the next record in the query (and after query is finished, to set the flag for the last) and evaluating this flag for colouring of the current record in ssrs.

    But you need some fixed order of data in selection/creation of temp table and the order from the dataset.

    Another way is using an ascending rownumber field within the temptable and simulate next through a lookup of the next record by this rownum+1

    sorry, didn't consider the colouring of the first row :-(

    Regards Douglas

  • Community Member Profile Picture
    on at

    Thanks Douglas, Adding a flag during data creation is what I thought as an alternative if the coloring cant be achieved from the report side functions. Thanks for directing me towards this

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans