Jump to content

Jasperserver and Ireport - JRJdbcQueryExecuter Err


vsoneta

Recommended Posts

Hello,

 

I have created a jrxml which is very simple, takes one input parameter and passes the information to the SQL 2000 select query which calls 2005 sql database and displays the values.

In Ireport when I click Preview it executes perfectly fine and my results gets displayed. But when I create the Report unit with the above jrxml and when I run this  it gives me an error:

com.jaspersoft.jasperserver.api.JSExceptionWrapper: net.sf.jasperreports.engine.JRException: Error executing SQL statement for : WebIntranetStoreOrdersReport at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:141)

 

I make it sure my input has data to be displayed.  This is happening only in Jasperserver.

Please help.

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Here is the sql 2000  query to call SQl 2005 sql server's store proc. Mind this is working fine when I execute the sql is sql 2000 server and also in ireport, it's just not in Jasperserver ?

 

USE [Reporting]


GO


/****** Object:  StoredProcedure [dbo].[reports_CurrentStoreOrders]    Script Date: 10/23/2009 10:55:30 ******/


SET ANSI_NULLS ON


GO


SET QUOTED_IDENTIFIER ON


GO










ALTER PROCEDURE [dbo].[reports_CurrentStoreOrders]


   @StoreNo as varchar(10)


AS



BEGIN


    SET NOCOUNT ON;




            DECLARE @sql varchar(8000)   




            SET @sql = '


 SELECT  OrderNumber, Line,OrderDate, PickUpDate, ERPDescription,QtyOrdered,ActualPrice,Tax,Department,StoreName,BTFirstName,BTLastName


 FROM OPENQUERY([hq1svrsql007\website], ''EXEC [hq1svrsql007\website].InSite.dbo.[reporting_StoreOrders] ' +


 '''''' + convert(varchar(10),@StoreNo) + ''''''')



'



 EXECUTE (@sql)



END





Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...