Change font color for a row when the value is one specific value - formatting

I'm trying to change the font color on complete row when a value. I found the question and answer for changing the font color on a particular cell on another post here.
This was part of the other answer:
=IIF(Fields!Registrations.Value <> Previous(Fields!Registrations.Value),
"Black",
"Blue")
but it won't do what I need. Is it possible?

In order to change the color of an entire row, you would just select the entire row and choose expression under colors in the property menu, just as the article you linked described. If you want the color to change when that row has a particular value for a particular field, you would use an expression more like this:
=iif(yourField.Value = yourValue, yourColor1, yourColor2)

Related

Check if MigraDoc font of a row is bold or not

I have a MigraDoc Table with multiple rows . I am trying to find if a particular row is bold or not
if(table.Rows[0].Font.bold ==font.bold)
{
Do Something
}
Idea is to change the colour of that row to a specific one.
There are many ways to set font attributes with MigraDoc. What do you want to happen if some columns are bold and some are not? Or if some columns contain both bold and regular text?
The clean approach would be determining the color of the row when you add contents to it. Each MigraDoc document element has a Tag member of type object that you can use for your own purposes.
When filling the row you can set the color directly. Or you can use the Tag member to mark the row as "important" and set the colors for important rows at a later stage.
Untested code that may work - and since there are several ways to make text bold, this will work only if the code that fills the rows also sets the Bold property to true:
if (table.Rows[0].Format.Font.Bold == true)
{
Do Something
}
The above will not work if a row is "bold", but the boldness comes from a Style or is set via paragraph properties.
IMHO using the Tag member is a cleaner way.

How to change the colour fill the cell based in the drop list menu?

I have found out how to get the last occurrence of the selected name from a list in excel 2016. The problem is that I want to "highlight" or change the color fill of the cell that is in the criteria when I choose its name in the list.
This is my code:
=PROC(2;1/(C1:C199=P61);A1:A199)
In my spreadsheet the name is in the 'C' column and the data is in the A column.
What I need is only to know how to change the color like in the image below. The drop list name and data code I know how to do.
Link of the image: enter link description here
Thanks.
You can achieve that by applying a Conditional Formatting to the desired range.
Make sure to select Range("A2:B15"), and then go to:
Home > Conditional Formatting > New rule > Use a Formula to determine which cells to format
Write this formula, and choose a format:
=COUNTIFS($A2;$D$3;$B2;$E$3)>0
Click OK, and then Apply

Excel - Highlight Rows based on look up value from another sheet

Hi I have an excel sheet, that has a column called as Company name
in another sheet there is there are couple of look ups.. i need to look up those and highlight them in different colors based on the look up list.
for example, in the above scenario, i need Company A Highligted in oone color and company C in another.
If highlighting is challgeng, i dont mind even having a seperate coloumn next to it that says, if it is a partner or competitor.
i tried the below formula under conditional formatting .. but doesnt work for different colours... it colors everything the same
=NOT(ISNA(VLOOKUP(B1,'Lookup List'!$A$2:$D$200,1,FALSE)))
Please try selecting Company Name column and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=COUNTIF('Lookup List'!$A:$A,B1)
Format..., select colour Fill (highlight) of your choice, OK, OK.
Then repeat with:
=COUNTIF('Lookup List'!$B:$B,B1)
with a different fill.
If every entry is one colour or the other then one CF rule is sufficient, with the other colour applied as standard fill.

Conditional Formatting in Rdlc

I want to set the color of column values in my rdlc table based on its value.Heres what I have done. =IIF(Fields!gpa.Value="Good",Fields!gpa.Color.Format("Red"),Fields!gpa.Color.Format("Blue"))
It only prints Red or Blue instead of actual value and Color of font remains same.What Am I doing wrong here and how can I fix it?.
You can set "Color" property of the cell using just color name or hex code:
=IIF(Fields!gpa.Value="Good","Red","Blue")
=IIF(Fields!gpa.Value="Good","#AF1E2D","#3232CC")
(codes used are just examples)

Using BIRT, how can I ensure that the background colour in a row is the same height in each cell in the row?

I have a BIRT report that I have set up to use conditional formatting so that the colour of the row alternates between grey and white. It works as expected except for the fact that the grey colour in a field with a string extends slightly below where the grey extends in a field with an integer. In other words, if the grey background is 1 inch high with an integer, it is 1.1 inch high with a string. I cannot see any differences in any of the margin or padding settings so I am not sure what would be causing this small issue.
It is easy to be confused with styling, because we can set style properties on rows, cells or data fields within cells.
As you describe this issue, i think you have not applied this conditional formatting on rows, but on cells or data fields.
When a BIRT table is selected in the outline view of Eclipse designer, we need to click on the left to select the whole row, and then define a conditional formatting. Thus, physically we can't have height differences between cells (at least in html format) because the style is applied on a "div" container.