I have a problem, I use Stimulsoft Reports.Fx for PHP.
I have a query that's like this:
SELECT CASE
WHEN tipo_lancamento = 'D'
THEN valor*-1
ELSE valor
END as resultado,
CASE
WHEN tipo_lancamento = 'D'
THEN valor*-1
END as despesas,
CASE
WHEN tipo_lancamento = 'R'
THEN valor
END as receitas,*
FROM v_despesas where (dedu_indedutivel<>2 or tipo_lancamento='R') and (data_pagamento>={data_inicial} and data_pagamento<={data_final}) order by data_lancamento
everything works fine until I use the sum function, if any of the results return NULL from the database it does not show the value in the summary
the problem is in "receita" "despesas" of the case
NULL problem
Re: NULL problem
Hello.
What value returns the SQL query with Sum function if you run it on the SQL server?
If yes, please, send us sample report template with data which reproduces the issue.
You could read how to prepare question on our Knowledge Base
Thank you.
What value returns the SQL query with Sum function if you run it on the SQL server?
If yes, please, send us sample report template with data which reproduces the issue.
You could read how to prepare question on our Knowledge Base
Thank you.