Crystal Reports Running total formula doesnt work
-
19-06-2021 - |
Pergunta
WhileReadingRecords;
numbervar Samples;
if {product.sku}="card-sample" then
Samples = Samples + {@num_qty};
Samples;
Above formula always returns Zero, I know @num_qty has values in it and in some rows it has NULL, if I tried to evaluate NULLS using below code, it gives me an error too
if (not (isnull{@num_qty})) then
Any ideas ??? Note: I'm trying this because, for my situation I cannot use CR built in Running totals
Solução
I believe your Samples
variable assignment is wrong, and you need to use :=
instead of =
, like this:
WhileReadingRecords;
numbervar Samples;
if {product.sku}="card-sample" then
Samples := Samples + {@num_qty};
Samples;
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow