This is a migrated thread and some comments may be shown as answers.

Conditional Formatting based on prior row

2 Answers 171 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
derek
Top achievements
Rank 1
derek asked on 26 Dec 2012, 03:21 PM
I tried searching, but my Google-Fu appears to not be functioning today.

What I want to do is Conditionally Format the field to Bold if it matches the value from the prior row.
So I have Field.A, Field.B, etc and I plan to bold the whole row if Field.A (in this row) equals Field.A (from the prior row).
I know how to apply the conditional format across the row (ie, to each field), and I know StringCompare(String1, String2), but I don't know how to grab the prior row's field.
Whether there's a function to do it, or I need to store the value in a variable so I can compare before updating to the current row, yadda yadda it's all good, but I need tips on how to do that.
I would imagine this has been done before.
FYI: The user can't control sorting, so I don't have to worry about that aspect.

2 Answers, 1 is accepted

Sort by
0
derek
Top achievements
Rank 1
answered on 26 Dec 2012, 10:02 PM
Now that it's a bit later in the day I did find this post here.  I didn't want to go that route, but I do believe it will work for me.
0
IvanY
Telerik team
answered on 28 Dec 2012, 12:20 PM
Hello Derek,

The proposed solution in the forum thread is one of the easiest. Other solutions in the report itself require much more work and it is not obvious what their purpose is, thus making your project harder to maintain.

In general it is always the best solution to prepare the data before passing it to the report - filtering, sorting, etc. can be done much easier and faster with a single query.

Kind regards,
IvanY
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

Tags
General Discussions
Asked by
derek
Top achievements
Rank 1
Answers by
derek
Top achievements
Rank 1
IvanY
Telerik team
Share this question
or