Format Table Cell Based on Content
I am using a table to display a list of records from an XML data source where the number of rows is variable based on the data. The table does not use the main data source. Both the main (default) and the table data source will be overridden in the integration to set the data required. The requirement is to change the format of the cell to white on black if the value is “MISSING” (literal string) but otherwise use black on white and print the provided text.
The table has a single row template, type of Data, with two textboxes filling the data of the text. These are bound to Table Data Fields. The content text is appropriately filling. The textbox is set as black on white (Font foreground color = black and background color = None).
The data source transforms do not allow access to the object color settings. I do not see how to use layers because the table seems to only accept one object per column. I tried using Document Scripts event “On New Record” event with the following:
If Format.Objects("tblComponentTrace").Value="MISSING" then
Format.Objects("tblComponentTrace").TextColor=BtColor.White
Format.Objects("tblComponentTrace").FillColor=BtColor.Black
End Ifbut it does not change the format when the value is MISSING.
How do I change the table cell format when the table data source is not the main data source?
Vous devez vous connecter pour laisser un commentaire.
Commentaires
0 commentaire