Search code examples
sql-server-2008stored-proceduresjasper-reports

sql server stored procedures in jaspersoft studio 5.6


I have a stored procedure my_sp which takes in two parameters, first an integer and then a date. That is,

EXEC my_sp 265522,'6-10-15'

I have been trying to design a report based on the result set from this procedure in Jaspersoft Studio 5.6. The report does not generate or atleast takes way too long if I use the two parameters though the output data consists of only 25 rows. I am using this query,

exec my_sp $P{param1} , $P{param2}

and feel the probelm is with the syntax only. Also the same query works perfect when I had tried it in Sql Server Management Studio and in jaspersoft studio, stored procedures with a single parameter work like magic. Kindly help me out on this


Solution

  • This should absolutely work.

    1. Add an ! after the P of each parameter
    2. Is the SP creating temp tables? If so try another driver OR create another SP that returns the result of this SP
    3. Try another driver anyway
    4. add the @paramname from tsql = $P{} instead of anonymously naming them