User-1644108997 posted
Hi Team,
We have scenario something like this explained below..
Lets say we have two stored procedure (see the complete script below)
1) GetRequest
2)GetRequestHistory
We created a dataset with 2 table for each procedure.We are not allowed to change the procedure.
With the above objects we need to created a SSRS report like below
Request details of
1
OS Installation
on <Report GeneratedDate)
Report Id : 1
RequestName : OS Installation
Request by : User1
Report History : Open (2015-06-23 22:20:52.750) , InProgress (2015-07-23 22:20:52.750) , Closed (2015-08-20 22:25:52.147)
how to do this...Here the procedure GetRequestHistory returns the history of the details of the procedure GetRequest.
In the ReportHistory in the report we want the details of the history in comma separated..
We are not allowed to change the procedure. We are working in ASP.NET we are using reportView to host the report.We will pass the RequestID as parameter in query string.
CREATE TABLE [dbo].[tblRequest](
[RequestID] [int] IDENTITY(1,1) NOT NULL,
[RequestName] [varchar](500) NOT NULL,
[RequestBy] [varchar](500) NOT NULL,
)
GO
CREATE TABLE [dbo].[tblRequestHistory](
[HistoryID] [int] IDENTITY(1,1) NOT NULL,
[RequestID] [int] NULL,
[Status] [varchar](50) NOT NULL,
[ModifiedDate] [datetime] NULL CONSTRAINT [DF_tblRequestHistory_ModifiedDate] DEFAULT (getdate())
)
GO
ALTER TABLE [dbo].[tblRequestHistory] WITH CHECK ADD CONSTRAINT [FK_tblEntity_tblCase] FOREIGN KEY([RequestID])
REFERENCES [dbo].[tblRequest] ([RequestID])
GO
ALTER TABLE [dbo].[tblRequestHistory] CHECK CONSTRAINT [FK_tblEntity_tblCase]
GO
CREATE PROC [dbo].[GetRequest]
@RequestId INT
AS
SELECT * FROM [dbo].[tblRequest] WHERE RequestID=@RequestId
GO
CREATE PROC [dbo].[GetRequestHistory]
@RequestId INT
AS
SELECT * FROM tblRequestHistory WHERE RequestID=@RequestId
GO