Problem generating report between dates

Asked

Viewed 440 times

3

I have a field DATETIME with a date and time: 2015-08-06 08:50:28. I’m trying to generate a report by passing two parameters, Data_Inicial and Data_Final so that I can get all the bank dates that are in that period.

The condition was that way in the IReport:

WHERE
     tbl_suspensao.`status` = 'Finalizado'
 AND tbl_suspensao.`data_inicio` BETWEEN  $P{Data_Inicio} AND $P{Data_Fim}

These two parameters are of the type: Date/Time of java.sql.Time. But when I enter the parameters and give a preview appears the message "The document has no pages". Someone can help?


inserir a descrição da imagem aqui inserir a descrição da imagem aqui inserir a descrição da imagem aqui inserir a descrição da imagem aqui

  • 1

    Take a test of data_inicio 01/01/2015 and data_fim 12/12/2015

  • Give the same message saying that the document does not contain pages

  • So your problem is not on the dates no little grasshopper, are you sure that this condition is valid tbl_suspensao.status = 'Finalizado' ?

  • I do, when I leave it alone it works perfectly. I did a test and put the type of the parameter as just DATE and it worked, but I can’t establish the hours.

  • I’ve changed and worked rsrs, but we can not use the with the schedule. But I’ll leave it that way anyway. Repurposing the question, how could I count in the report itself how many Customers have status = 'Finished' and how many have status = 'Pending' ?

  • You have to give a Count on status grouping together by status

  • 1

    But I advise you to create another question so as not to pollute this

  • I tried to give a Count in status but it counts all independently whether it is Finalized or Pending. The expression stayed this way in the status field I added in the band sumary: $V{tbl_suspensao_status_2}

  • I get it. I’ll try to do it if I don’t work I open another question.

  • You can answer this question since you also helped me to reach the solution. Or you prefer that I answer?

  • Can you even :}

Show 6 more comments

1 answer

0


The solution to the problem was to change the type of the two parameters to java.util.Date before they were like java.sql.Time

Browser other questions tagged

You are not signed in. Login or sign up in order to post.