PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV 2024 → [WD19] - Show empty table cell if zero value
[WD19] - Show empty table cell if zero value
Iniciado por JP, jul., 28 2014 12:18 PM - 10 respostas
Publicado em julho, 28 2014 - 12:18 PM
Hi All,

I have a table control and some values are zero. How can I not show anything in a table cell if the value is zero? I thought this was done by setting the column "Reset is zero" or perhaps "NULL if empty" checkboxes but this seems to have no effect and the zero values display anyway. Is it possible?

TIA
Publicado em julho, 28 2014 - 2:17 PM
Hi TIA,

I solved this so far by adding a table column (text type), then converted the respective values to text and displayed them in this column - if zero then format to "".
The original column is hidden and used for Holding the original values.

reset if Zero seems not to work in tables

Erik
Publicado em julho, 28 2014 - 2:41 PM
Hi Erik,

You can also use the "On row display" event to set a numeric column or a date column to "" and it will give the same result as you said. It's not required to have a separated column.

Best regards,
Alexandre Leclerc

PS: If I'm not mistaken, this problems occurs when you havve a data table directly linked to a query or table. Then it looks like the check box is not taken account of. But on the row display event you can manually "fix" this. I never thought to send a bug report on that one.
Publicado em julho, 28 2014 - 2:41 PM
Hi TIA <img src="/NG2013_WEB/ui/smiley/6.gif" align=absmiddle border=0 alt=";)"> (and JP)

Tested it in WD16, and checking "Reset if zero" does work here.

Maybe a new feature in V19 ? ;)

Bart
Publicado em julho, 28 2014 - 2:49 PM
HI Bart,

You joke but I think you might be right becuase I was so sure that the "Reset if zero" did actually show a blank if the value was zero. This is where my thought came from. But it doesnt work now anymore :/
Publicado em julho, 29 2014 - 8:07 AM
Hi

I can confirm that the 'Reset if zero' option works as advertised in WD19: on a table column which has the type set to Numeric, and the table is linked to the database. Just had occasion to do this recently.

Christopher
Publicado em julho, 29 2014 - 8:07 AM
Hi Alexandre,

thanks for the info, indeed I am using tables directly linked to qeries most of the time.
Will try your approach the next time.


Erik
Publicado em julho, 29 2014 - 2:08 PM
Hi Christopher,

Thank you for confirming this. I know this does not work for a date column - and setting to empty manually is the way we use to fix the problem.

Best regards,
Alexandre Leclerc
Membro registado
14 mensagems
Publicado em janeiro, 02 2020 - 3:21 AM
I need to hide a cell in a column under a certain condition for example, if another field has a 1 in it.. However the cell is a Checkbox and I can't seem to find any way to make it disappear on certain rows. My table is a memory table
Membro registado
14 mensagems
Publicado em janeiro, 02 2020 - 1:01 PM
I can do everything I need except make the checkbox disappear on certain rows. Seems like there should be come way of doing this.
Membro registado
14 mensagems
Publicado em janeiro, 02 2020 - 2:56 PM
I don't believe it can currently be done so I'm going a different route