Jump to content

How to use MSSQL stored procedure in iReport


asifisyed

Recommended Posts

Hi,

I have been googling to find out a tutorial how to call MSSQL stored Proc from iReport but couldn't find any. I would be grateful If someone helps me regarding this. I was trying with some sample stored procedure, ireport shows SP does not return any result set.

Does this mean , SP must have OUT parameter. What are the criteria of Stored-Procedure which statifies iReport.

 

Thanks.

Asif

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

 

I use them all the time, should work without any extra effort.

EXEC DBNAME.owner.usp_ShowSomething '$P!{someParameter}'

No out parameter should be needed, whatever your final select is in the procedure should be available to jasper/ireport as data.

The simple sample SP I put in the code section works for me,

 

 

Code:
CREATE PROCEDURE usp_ShowSomething	@someParameter VARCHAR(MAX)ASBEGIN	SET NOCOUNT ON	SELECT 'This should show your parameter: ' as column1, @someParameter as column2END
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...