Report: Compare value and format a cell

Greetings

In a report (obtained from a stored procedure); I can't get the formula to format a cell or row when the value of the “Vigente” column is empty or different from “V”.
In reports (from an stored procedure) I'm trying to format a cell if the value of

When I compare the name of the columns I do manage to format fields in accounting format. In this case it is a column with text value (empty or with 'V').

I have tried variants with Format Cell and Format Row.

1:

<#if(<#Detallado.**>="Vigente";<#if(<#Detallado.*> <>"V";<#format row(red)>;)>;)>

2:

<#if(<#Detallado.**>="Vigente";<#if(<#Detallado.*> <>"V";<#format cell(red)>;)>;)>

The full formula is this:

<#Detallado.*><#if(<#Detallado.**>="Vigente";<#if(<#Detallado.*> <>"V";<#format row(red)>;)>;)><#if(<#Detallado.**>="SubTotald";<#Format Cell(Contable)>;)><#if(<#Detallado.**>="Descuentod";<#Format Cell(Contable)>;)><#if(<#Detallado.**>="Retenciond";<#Format Cell(Contable)>;)><#if(<#Detallado.**>="Totald";<#Format Cell(Contable)>;)><#if(<#Detallado.**>="ivaRetenido";<#Format Cell(Contable)>;)><#if(<#Detallado.**>="ivaTraslado";<#Format Cell(Contable)>;)><#if(<#Detallado.**>="IVATotal";<#Format Cell(Contable)>;)><#if(<#Detallado.**>="pgImporte";<#Format Cell(Contable)>;)><#if(<#Detallado.**>="ImporteCh";<#Format Cell(Contable)>;)><#if(<#Detallado.**>="PesosCh";<#Format Cell(Contable)>;)>

I have put that #if-format even at the end of the formula and I don't get it.

Thank you in advance.


I have tried other variants (expressions), without success:

What do you get if you debug the report?
See FlexCel Reports Designer Guide | FlexCel Studio for VCL and FireMonkey documentation

1 Like

Thank you for the debugging tip Adrian!

Now it's working:
image

My expression was incorrect; once corrected, I was able to use it in an abbreviated form in the report:

Config:

# Name: NoValidado
# Expression: <#if(<#Detallado.**>="Vigente";<#if(<#Detallado.*> <>"V";<#format Cell(NoValidado)>;)>;)>

In worksheet:

<#Detallado.*><#NoValidado><#...>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.