wood burning stoves*
The moose likes Other Java Products and Servers and the fly likes Jasper iReport  Query Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Jasper iReport  Query Problem" Watch "Jasper iReport  Query Problem" New topic
Author

Jasper iReport Query Problem

Srinivasan Karunanithy
Greenhorn

Joined: Nov 01, 2008
Posts: 9
I have been breaking my head for 2 days for executing the query in iReport.

My problem is, I want to call an stored procedure in an MSSQL server from iReport.

Query :


SET QUOTED_IDENTIFIER OFF
SET DATEFORMAT mdy

Exec SP_SAMPLE '12-jan-2008','12-jul-2011',
"$P!{Param1}",
"$P!{Param2}",
1,
"$P!{Param3}"

SET QUOTED_IDENTIFIER ON

Where,
Param1 = 'A436F3A9-6A8B-40C4-B38E-567B05522449','4DD40BC2-3390-4B1B-8841-483A8FDAB2FD','B95E8F04-6EE7-4BC6-BDD0-F95C4AFDAC0B','AE757961-0E25-41B8-A382-7600DDA0ABC7','90B9CC0C-6090-4CEF-8BC9-9C8EA3C0F63C','1E191B19-13D0-4CE2-B1EC-3CFF9316887F','A9EE7AE9-435C-4164-96F5-3DB20A6321BE','DCD6D045-8B42-4B83-8C97-21EE9DFF644C'

Param2 = '4E6E8464-F08A-4BB8-950F-38908E4E7B30','76EBA40E-F898-4541-9208-8A6B3A35E082','7C64DA92-C168-4A74-8955-F1974258AD12','2E6DDC25-E037-4842-9E7F-2B9586561744'


param3 = 3EC43FB7-F258-4441-8188-A55E7BD40ADE


Note: That Stored Procedure param1,param2,param3 is text datatype in sqlserver. Whereas in iREport i made it as collection.


Could any one tell me how do i generate the above query in iReport with the double quotes??

Thanks & regards,<br />Srinivasan
Srinivasan Karunanithy
Greenhorn

Joined: Nov 01, 2008
Posts: 9
Srinivasan Karunanithy wrote:I have been breaking my head for 2 days for executing the query in iReport.

My problem is, I want to call an stored procedure in an MSSQL server from iReport.

Query :


SET QUOTED_IDENTIFIER OFF
SET DATEFORMAT mdy

Exec SP_SAMPLE '12-jan-2008','12-jul-2011',
"$P!{Param1}",
"$P!{Param2}",
1,
"$P!{Param3}"

SET QUOTED_IDENTIFIER ON

Where,
Param1 = 'A436F3A9-6A8B-40C4-B38E-567B05522449','4DD40BC2-3390-4B1B-8841-483A8FDAB2FD','B95E8F04-6EE7-4BC6-BDD0-F95C4AFDAC0B','AE757961-0E25-41B8-A382-7600DDA0ABC7','90B9CC0C-6090-4CEF-8BC9-9C8EA3C0F63C','1E191B19-13D0-4CE2-B1EC-3CFF9316887F','A9EE7AE9-435C-4164-96F5-3DB20A6321BE','DCD6D045-8B42-4B83-8C97-21EE9DFF644C'

Param2 = '4E6E8464-F08A-4BB8-950F-38908E4E7B30','76EBA40E-F898-4541-9208-8A6B3A35E082','7C64DA92-C168-4A74-8955-F1974258AD12','2E6DDC25-E037-4842-9E7F-2B9586561744'


param3 = 3EC43FB7-F258-4441-8188-A55E7BD40ADE


Note: That Stored Procedure param1,param2,param3 is text datatype in sqlserver. Whereas in iREport i made it as collection.


Could any one tell me how do i generate the above query in iReport with the double quotes??


Also, Is there any way to display the query with filled parameter values when running iReport?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jasper iReport Query Problem
 
Similar Threads
Refreshing Cookie
Diff between Java Stored Procedure and Oracle Stored Procedure
Error while callling stored procedure : Non supported SQL92 token
How to call stored procedures in ejb2.1?
Stored Procedure in Spring & hibernate.