一起跟踪2个详细信息部分以了解相同的项目详细信息

时间:2019-09-24 10:36:53

标签: crystal-reports

我有3张桌子的要求

表1 Header Table

表2 Detail Table

表3

enter image description here

,报告格式如下

enter image description here

存储过程

ALTER procedure [dbo].[BGradeWarehouseSummary]
@DOCNO int
AS 
BEGIN
SELECT        ADDON_P2_WHS_COUNTSO_H.DOCNO, ADDON_P2_WHS_COUNTSO_H.WAREHOUSENO, ADDON_P2_WHS_COUNTSO_H.DOCDATE, ADDON_P2_WHS_COUNTSO_H.ISCOPIED, ADDON_P2_WHS_COUNTSO_H.CUSTOMERNO, 
                         ADDON_P2_WHS_COUNTSO_H.CUSTOMERNAME, ADDON_P2_WHS_COUNTSO_D.BATCHNO, ADDON_P2_WHS_COUNTSO_D.PRODUCTCODE, ADDON_P2_WHS_COUNTSO_D.PRODUCTDESC
FROM            ADDON_P2_WHS_COUNTSO_H INNER JOIN
                         ADDON_P2_WHS_COUNTSO_D ON ADDON_P2_WHS_COUNTSO_H.DOCNO = ADDON_P2_WHS_COUNTSO_D.DOCNO AND ADDON_P2_WHS_COUNTSO_H.WAREHOUSENO = ADDON_P2_WHS_COUNTSO_D.WAREHOUSENO
WHERE    ADDON_P2_WHS_COUNTSO_H.DOCNO = @DOCNO

END 

ALTER procedure [dbo].[WHS_BGradeWarehouseSummary]
@DOCNO int
AS 
BEGIN
SELECT        ADDON_P2_WHS_COUNTSO_WSUMMARY.DOCNO,ADDON_P2_WHS_COUNTSO_WSUMMARY.PRODUCTCODE, ADDON_P2_WHS_COUNTSO_WSUMMARY.WAREHOUSENO, ADDON_P2_WHS_COUNTSO_WSUMMARY.TOTALBATCHES, 
                         ADDON_P2_WHS_COUNTSO_WSUMMARY.TOTALQTY
FROM            ADDON_P2_WHS_COUNTSO_D INNER JOIN
                         ADDON_P2_WHS_COUNTSO_WSUMMARY ON ADDON_P2_WHS_COUNTSO_D.DOCNO = ADDON_P2_WHS_COUNTSO_WSUMMARY.DOCNO AND 
                         ADDON_P2_WHS_COUNTSO_D.PRODUCTCODE = ADDON_P2_WHS_COUNTSO_WSUMMARY.PRODUCTCODE AND 
                         ADDON_P2_WHS_COUNTSO_D.WAREHOUSENO = ADDON_P2_WHS_COUNTSO_WSUMMARY.WAREHOUSENO
WHERE    ADDON_P2_WHS_COUNTSO_WSUMMARY.DOCNO = @DOCNO

END  
GO

所以我创建了2个存储过程,并创建了主报告和子报告,但是无法在重复细节部分的Crystal报表中遵循相同格式,是否有创建相同格式的建议?

0 个答案:

没有答案