0
votes

I'm trying to retrieve data in iReport using stored procedure(SP) in SQL Server 2008.

My stored procedure uses two parameters Date_From & Date_To. I would like to run the report in specified (by these parameters) period but in any case I have info like "No data in report". In table the date is stored in format "yyyy-MM-dd 00:00:00.000". both of the parameters are set as "java.util.Date". In the Report query I have:

  • Query language = plsql
  • In query window: Name_of_procedure $P{Date_From}, $P{Date_To}

I found somewhere info that is possible to change the Date format and I have change it to: Date format "yyyy-MM-dd", but after this change, instead of generate the report iReport is coming back to the Designer window, without any error or info.

May I ask for help, how to correct set the parameter that would provide the Date in format "yyyy-MM-dd"?

iReport version: 5.1.0

1

1 Answers

0
votes

To see the error you can go to Window--> Report Output option there you can find the error.

To call the procedure syntax should be

  CALL  Name_of_procedure ( $P{Date_From}, $P{Date_To})

and to set the default value for parameters you can use this syntax.

   new  Date(114,7,06)  --> to set default date as 06 Aug 2014.