Doing conditional formatting on empty cells
I'm currently building a matrix style report.
After each rowgroup, i would like to 开发者_如何学JAVAadd in a nice 2pt solid black border. Unfortunately not all fields in the matrix will have data in them, and therefore i don't seem to be able to use conditional formatting on the cell level.
I've tried using IIF(RowNumber("group") = 1, "Black", "Light Gray") For the top border, but it doesn't seem to get the answer right all the time.
I tried to put RowNumber("group") into a visible field, which both caused the fields that should be empty to fill with copies from other cells and showed RowNumber to be changing in the middle of a row (it was shown for each column group), on several occasions.
Anyone got an idea as to what i can do as an alternative?
I have had success putting the information into a Group Variable, then even if there is no data for that cell you can still access the Variable("varName").Value and do conditional formatting based on that.
So say you have a column that is time, and you want to conditionally set the background based on the time. But there is a cell(row and column intersection) that doesn't exist in the dataset. Normally you wouldn't be able to access Fields!time.value at all. But if for the Time group you create a Variable called Time, you will be able to access Variable("Time").Value in that cell to see what column its in.
精彩评论