Setting an ExecutionEntry icon depending on the result in List&Label reports
This article explains how to set the icon of an ExecutionEntry depending on the execution result when using List & Label reporting.
You want to create a report showing the status of the ExecutionEntries of an ExecutionList using List & Label. To improve readability, you want to display the different ExecutionEntry icons depending on whether the actual result is passed, failed or not executed.
Solution With Example
Let's create a simple report showing the status of your execution entries.
Create a report definition that looks like this:
Right-click on "MyExecutionReport" and select "Design Report..." in order to open List & Label.
Go to "Insert" and insert a report container. Select "Table" as datasource in the subsequent wizard. Select "ExecutionEntry" as shown in the following picture.
Select the following columns:
Double-click the newly created table in the objects tree on the left-hand side and enter the edit mode "TOSCA.Images.ExecutionEntry" with a double-click.
Change the value to:
if(ExecutionEntry.ActualResult=="Passed",TOSCA.Images.Result.Passed, (if(ExecutionEntry.ActualResult=="Failed",TOSCA.Images.Result.Failed, TOSCA.Images.ExecutionEntry)))
Now, different icons are used, depending on the execution result.