How to set text background colour in code from data value
Posted: Tue Dec 11, 2012 11:20 am
Hi, I am creating a report in code, and I need to be able to set the background colour of a text item based on the value of a data column in the dictionary. I have a text item on the report and I set the text property to the required data column (e.g. {datasource.columnname}), I then want to use this value to set the background colour of another text item. I have tried to use the text BeforePrint and GetValue events and also the databand BeforeRender, but the value of the text item remains as the data column name. I have also tried adding a variable, but this also does not have the value of the data column in the events mentioned.
Can you please help, and suggest how I might achieve this.
Thanks.
Can you please help, and suggest how I might achieve this.
Thanks.