Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
576 views
in Technique[技术] by (71.8m points)

JASPER REPORTS MULTIPLE RESULT SETS FROM SQL SERVER STORED PROCEDURE

I am at a learning phase for Jasper reports. I am using SQL Server & Stored Procedures to create a jasper report. I have created a stored procedure that returns multiple results sets. Please check the below code,

 SET ANSI_NULLS ON
GO
 
SET QUOTED_IDENTIFIER ON
GO
 
CREATE PROCEDURE [dbo].[usp_test]
 
AS
BEGIN
SET NOCOUNT ON;
     SELECT * FROM MEMBER WHERE ID =1;
     SELECT * FROM MEMBER_DTL WHERE FK_MEMBER = 1;
     SELECT * FROM MEMBER_BANK_DTL WHERE FK_MEMBER=1;
 
 
END
GO

Now, when I execute the stored procedure using EXEC usp_test into the query pane, it only generates fields from the first result set. I don't want to create sub reports(if possible as there will be more than 10 results sets sometimes and also when I will create a subreport then also it will generate the same fields from 1st result set which is not feasible). So, how can I generate multiple datasets from these result sets and display them one by one whenever I needed.

question from:https://stackoverflow.com/questions/65713687/jasper-reports-multiple-result-sets-from-sql-server-stored-procedure

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...