erickdeoliveiraleal Posted October 2, 2014 Posted October 2, 2014 I have a report that works fine in iReport Designer but in Studio it shows me an empty page. If I delete the line where parameter $P{DATA} is used, the report works fine.SELECT INTERNO.NOME_INTERNO, INTERNO.RGI, INTERNO.tempo_consolidado_ano, interno.tempo_consolidado_mes, INTERNO.tempo_consolidado_dia, INTERNO.REGIME_ATUAL, PAVILHAO.PAVILHAO, GALERIA.GALERIA, CELA.CELA, SOLARIO.SOLARIO, COALESCE(DESTINO.destino,'NÃO INFORMADO') DESTINO, agenda_atendimento.data_agenda, agenda_atendimento.hora_agenda, c.cidade, UNIDADE_PENAL.NOME_UP, UNIDADE_PENAL.sigla, CASE agenda_atendimento.id_up WHEN '104' THEN (SELECT nome_funcionario FROM funcionario WHERE FUNCIONARIO.id_funcao= 401 AND FUNCIONARIO.id_up = 104) WHEN '105' THEN (SELECT nome_funcionario FROM funcionario WHERE FUNCIONARIO.id_funcao= 401 AND FUNCIONARIO.id_up = 105) WHEN '106' THEN (SELECT nome_funcionario FROM funcionario WHERE FUNCIONARIO.id_funcao= 401 AND FUNCIONARIO.id_up = 106) WHEN '107' THEN (SELECT nome_funcionario FROM funcionario WHERE FUNCIONARIO.id_funcao= 401 AND FUNCIONARIO.id_up = 107) WHEN '308' THEN (SELECT nome_funcionario FROM funcionario WHERE FUNCIONARIO.id_funcao= 401 AND FUNCIONARIO.id_up = 308) WHEN '309' THEN (SELECT nome_funcionario FROM funcionario WHERE FUNCIONARIO.id_funcao= 401 AND FUNCIONARIO.id_up = 309) WHEN '408' THEN (SELECT nome_funcionario FROM funcionario WHERE FUNCIONARIO.id_funcao= 401 AND FUNCIONARIO.id_up = 408) WHEN '3010' THEN (SELECT nome_funcionario FROM funcionario WHERE FUNCIONARIO.id_funcao= 401 AND FUNCIONARIO.id_up = 3010) ELSE 'CampoBranco' END AS NOME_CHEFE_NUARQ, 'CHEFE DA NUARQ' AS CHEFE_NUARQ, CASE agenda_atendimento.id_up WHEN '104' THEN (SELECT nome_funcionario FROM funcionario WHERE FUNCIONARIO.id_funcao= 501 AND FUNCIONARIO.id_up = 104) WHEN '105' THEN (SELECT nome_funcionario FROM funcionario WHERE FUNCIONARIO.id_funcao= 501 AND FUNCIONARIO.id_up = 105) WHEN '106' THEN (SELECT nome_funcionario FROM funcionario WHERE FUNCIONARIO.id_funcao= 501 AND FUNCIONARIO.id_up = 106) WHEN '107' THEN (SELECT nome_funcionario FROM funcionario WHERE FUNCIONARIO.id_funcao= 501 AND FUNCIONARIO.id_up = 107) WHEN '308' THEN (SELECT nome_funcionario FROM funcionario WHERE FUNCIONARIO.id_funcao= 501 AND FUNCIONARIO.id_up = 308) WHEN '309' THEN (SELECT nome_funcionario FROM funcionario WHERE FUNCIONARIO.id_funcao= 501 AND FUNCIONARIO.id_up = 309) WHEN '408' THEN (SELECT nome_funcionario FROM funcionario WHERE FUNCIONARIO.id_funcao= 501 AND FUNCIONARIO.id_up = 408) WHEN '3010' THEN (SELECT nome_funcionario FROM funcionario WHERE FUNCIONARIO.id_funcao= 501 AND FUNCIONARIO.id_up = 3010) ELSE 'CampoBranco' END AS NOME_DIRETOR_DE_PENITENCIARIA, 'DIRETOR DE PENITENCIÁRIA' AS DIRETOR_DE_PENITENCIARIAFROM INTERNO INNER JOIN PAVILHAO ON (INTERNO.IDPAVILHAO = PAVILHAO.ID_PAVILHAO) INNER JOIN GALERIA ON (INTERNO.IDGALERIA = GALERIA.ID_GALERIA) INNER JOIN CELA ON (INTERNO.IDCELA = CELA.ID_CELA) INNER JOIN SOLARIO ON (INTERNO.IDSOLARIO = SOLARIO.ID_SOLARIO) INNER JOIN agenda_atendimento ON (INTERNO.id_interno=agenda_atendimento.id_interno) INNER JOIN agenda_situacao ag ON (ag.idagenda_situacao = agenda_atendimento.idagenda_situacao) LEFT JOIN destino ON (destino.id_destino=agenda_atendimento.iddestino) LEFT JOIN cidade c ON (c.id_cidade=destino.idcidade)LEFT JOIN UNIDADE_PENAL ON (UNIDADE_PENAL.ID_up=INTERNO.id_UP)WHERE INTERNO.ST = 'A' AND INTERNO.ID_UP = $P{UNIDADE}AND DATA_AGENDA= $P{DATA}AND ag.descricao NOT LIKE 'CANCELADO'ORDER BY agenda_atendimento.hora_agenda, c.cidade, destino.destino, INTERNO.NOME_INTERNO[/code] The parameter $P{DATA} is a java.util.Date type and works fine in iReport Designer. But with Jaspersoft Studio it shows a empty report. I already checked if the parameter were filled, I already changed the parameter type to Timestamp. But nothing happens.
erickdeoliveiraleal Posted October 2, 2014 Author Posted October 2, 2014 If I replace $P{DATA} by '2014-09-01' it works nice!Also in a new test I created a parameter "DataString" and i just entered "2014-09-01" then the console shows Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]please remove this checking, this is so annoying
djohnson53 Posted October 2, 2014 Posted October 2, 2014 You shouldn't have a problem now with the Anti-Spam system.
erickdeoliveiraleal Posted October 2, 2014 Author Posted October 2, 2014 Thanks. And now I think I know why the problem is happening, when I was simulating a report I chose Date but not time, then the Studio filled with actual time. But all field were filled with 00:00:00 then no items were found
erickdeoliveiraleal Posted October 2, 2014 Author Posted October 2, 2014 But there is a bug yet, the time picker doesnt allow to choose 00:00:00 it only allows 12:00:00
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now