执行此过程后,在我的结果集中,我只有2个字段,我无法找出错误。我的结果集中只有Sl No和TypeofDocument
我的代码:
IF OBJECT_ID('PrGetDetails') IS NOT NULL
DROP PROCEDURE PrGetDetails
GO
CREATE PROCEDURE PrGetDetails
AS
BEGIN
SET NOCOUNT ON;
DECLARE @ReportDetails TABLE(
SlNo INT,
TypeOfDocument NVARCHAR(150),
Supplier NVARCHAR(150),
CodeNo NVARCHAR(150),
ReceivedDate Date,
ST_C DECIMAL(20,2),
ST_D DECIMAL(20,2),
EC_C DECIMAL(20,2),
EC_D DECIMAL(20,2),
HC_C DECIMAL(20,2),
HC_D DECIMAL(20,2)
);
INSERT INTO @ReportDetails (SlNo,
TypeOfDocument,
Supplier,
CodeNo,
ReceivedDate,
ST_C,
ST_D,
EC_C,
EC_D,
HC_C,
HC_D)
values
(1,'A','S1','AAJF7LSD01','2014/04/04',4362.00,0.00,87.00,0.00,44.00,0.00),
(2,'B','S2','AAJFV87LSD1','2014/04/04',2520.00,0.00,50.00,0.00,25.00,0.00),
(3,'C','S3','AK6009T001','2014/04/08',10498.00,0.00,210.00,0.00,105.00,0.00),
(4,'D','S3','AJ6009LST1','2014/04/16',45723.00,0.00,914.00,0.00,457.00,0.00),
(5,'E','S4','AAKPK8983001','2014/04/16',171.00,0.00,3.00,0.00,2.00,0.00),
(6,'F','S5','AKIPM8938P001','2014/04/16',14952.00,0.00,299.00,0.00,149.00,0.00),
(7,'G','S6','AKIPM8938P001','2014/04/16',28849.00,0.00,577.00,0.00,288.00,0.00),
(8,'','S7','AABCA7375CST042','2014/04/23',60000.00,0.00,1200.00,0.00,600.00,0.00),
(9,'','S8','AABCA7375CST042','2014/04/23',1482.00,0.00,30.00,0.00,15.00,0.00),
(10,'','S8','AABCA7375CST042','2014/04/29',250800.00,0.00,5016.00,0.00,2508.00,0.00)
SELECT * FROM @ReportDetails
END
GO
答案 0 :(得分:0)
请转到您的项目文件夹,删除xxxx.rdl.data文件。然后再次检索数据。当我使用您的程序测试时,它可以正确返回所有字段和记录。