• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Jasper iReport Query Problem

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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??
 
Srinivasan Karunanithy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!