NULL problem

Stimulsoft Reports.PHP discussion
Post Reply
Ricardão
Posts: 2
Joined: Mon Jul 08, 2013 1:03 am

NULL problem

Post by Ricardão »

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
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: NULL problem

Post by HighAley »

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.
Post Reply