Forum > Spanish

Ocultar valores en cero con LastReport

(1/1)

esdonis:
Estoy tratando de cultar los valores en cero de una formula.

Pero me oculta los valores si una parte de la expresion = 0 no el valor total

La formula es la que sigue:

[[datmod.tsqlquery."EXIST"]-[datmod.tsqlquery."CANTIDAD"]]

si por ejemplo es valor es:
[[20]-[0]]
Me oculta el valor sin embargo el resultado es 20 no 0

Como podria solucionar este problema?

GAN:
Con código, te muestro un ejemplo.

En tu caso podría ser algo así:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---if ([datmod.tsqlquery."EXIST"]-[datmod.tsqlquery."CANTIDAD"]) <=0 then text:=''; 
Y en texto:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---[[datmod.tsqlquery."EXIST"]-[datmod.tsqlquery."CANTIDAD"]] 

esdonis:
Perfecto

Muchas Gracias por la ayuda

esdonis:
La solución final fue poner en el código:

if ([datmod.tsqlquery."EXIST"]-[datmod.tsqlquery."CANTIDAD"]) = 0 then
 text:=''
else
 text:=[datmod.tsqlquery."EXIST"]-[datmod.tsqlquery."CANTIDAD"];

Porque si no pongo el else al encontrar el primer valor = 0 sigue asumiendo el resto de los valores como cero

Navigation

[0] Message Index

Go to full version