Crystal 报表不显示页面

Crystal report does not display the page

    @BarId AS INTEGER
    AS
    BEGIN
    SET NOCOUNT ON

    BEGIN

    select a.*, b.remark from 
    (
    SELECT
    min(bardetailid) as BarDetailId, 
    min(barid) as BarId,
    min(Member) as Member,
    min(MemberNo) as MemberNo,
    min(BarMark) as BarMark,
    [TypeSize] , 
    min(BarLength) as BarLength,
    min(BarNo) as BarNo,
    min(BarTotal) as BarTotal,
    [ShapeCode] ,
     CAST(MAX(CAST(ShapeImage AS VARBINARY(MAX))) AS IMAGE) as ShapeImage,
    CASE 
        WHEN c.dima <> 0 THEN 
             'A=' + CONVERT(varchar, cast(c.dima AS decimal(18, 0)))
        ELSE '' 
      END + 
        CASE 
            WHEN c.dimb <> 0 THEN 
               ', B=' + CONVERT(varchar, cast(c.dimb AS decimal(18, 0)))
            ELSE '' 
        END + 
        CASE 
            WHEN c.dimc <> 0 THEN 
               ', C=' + CONVERT(varchar, cast(c.dimc AS decimal(18, 0)))
            ELSE '' 
        END + 
        CASE 
            WHEN c.dimd <> 0 THEN 
               ', D=' + CONVERT(varchar, cast(c.dimd AS decimal(18, 0)))
            ELSE '' 
        END + 
        CASE 
            WHEN c.dime <> 0 THEN 
               ', E=' + CONVERT(varchar, cast(c.dime AS decimal(18, 0)))
            ELSE '' 
        END + 
        CASE 
            WHEN c.dimf <> 0 THEN 
               ', F=' + CONVERT(varchar, cast(c.dimf AS decimal(18, 0)))
            ELSE '' 
        END + 
        CASE 
            WHEN c.dimg <> 0 THEN 
               ', G=' + CONVERT(varchar, cast(c.dimg AS decimal(18, 0)))
            ELSE '' 
        END + 
        CASE 
            WHEN c.dimn <> 0 THEN 
               ', N=' + CONVERT(varchar, cast(c.dimn AS decimal(18, 0)))
            ELSE '' 
        END
      AS Dimension,
      min(DimA) AS DimA,
      min(DimB) AS DimB,
      min(DimC) AS DimC,
      min(DimD) AS DimD,
      min(DimE) AS DimE,
      min(DimF) AS DimF,
      min(DimG) AS DimG,
      min(DimN) AS DimN,
      min(Active) AS Active,
      min(c.CreatedDtTm) AS CreatedDtTm,
      min(createdby) as CreatedBy, 
      min(createdip) AS [CreatedIp],
      min(UpdatedDtTm) as [UpdatedDtTm],
      min(UpdatedBy) AS [UpdatedBy],
      min(UpdatedIp) AS [UpdatedIp]
    FROM            bar_schedule_detail c
    WHERE           active = 1 
    AND             barid = @BarId    
    GROUP BY
    [TypeSize],      
    [ShapeCode] , 
    CASE 
        WHEN dima <> 0 THEN 
             'A=' + CONVERT(varchar, cast(dima AS decimal(18, 0)))
        ELSE '' 
      END + 
        CASE 
            WHEN dimb <> 0 THEN 
               ', B=' + CONVERT(varchar, cast(dimb AS decimal(18, 0)))
            ELSE '' 
        END + 
        CASE 
            WHEN dimc <> 0 THEN 
               ', C=' + CONVERT(varchar, cast(dimc AS decimal(18, 0)))
            ELSE '' 
        END + 
        CASE 
            WHEN dimd <> 0 THEN 
               ', D=' + CONVERT(varchar, cast(dimd AS decimal(18, 0)))
            ELSE '' 
        END + 
        CASE 
            WHEN dime <> 0 THEN 
               ', E=' + CONVERT(varchar, cast(dime AS decimal(18, 0)))
            ELSE '' 
        END + 
        CASE 
            WHEN dimf <> 0 THEN 
               ', F=' + CONVERT(varchar, cast(dimf AS decimal(18, 0)))
            ELSE '' 
        END + 
        CASE 
            WHEN dimg <> 0 THEN 
               ', G=' + CONVERT(varchar, cast(dimg AS decimal(18, 0)))
            ELSE '' 
        END + 
        CASE 
            WHEN dimn <> 0 THEN 
               ', N=' + CONVERT(varchar, cast(dimn AS decimal(18, 0)))
            ELSE '' 
        END
        ) as a, bar_schedule_detail b
       where a.typesize = b.typesize
       and a.shapecode = b.shapecode
       and 
      (
      CASE 
        WHEN b.dima <> 0 THEN 
      'A=' + CONVERT(varchar, cast(b.dima AS decimal(18, 0)))
     ELSE '' 
    END + 
    CASE 
     WHEN b.dimb <> 0 THEN 
        ', B=' + CONVERT(varchar, cast(b.dimb AS decimal(18, 0)))
     ELSE '' 
     END + 
     CASE 
     WHEN b.dimc <> 0 THEN 
        ', C=' + CONVERT(varchar, cast(b.dimc AS decimal(18, 0)))
     ELSE '' 
     END + 
     CASE 
     WHEN b.dimd <> 0 THEN 
        ', D=' + CONVERT(varchar, cast(b.dimd AS decimal(18, 0)))
     ELSE '' 
     END + 
     CASE 
     WHEN b.dime <> 0 THEN 
        ', E=' + CONVERT(varchar, cast(b.dime AS decimal(18, 0)))
     ELSE '' 
    END + 
    CASE 
     WHEN b.dimf <> 0 THEN 
        ', F=' + CONVERT(varchar, cast(b.dimf AS decimal(18, 0)))
     ELSE '' 
     END + 
    CASE 
     WHEN b.dimg <> 0 THEN 
        ', G=' + CONVERT(varchar, cast(b.dimg AS decimal(18, 0)))
     ELSE '' 
    END + 
    CASE 
     WHEN b.dimn <> 0 THEN 
        ', N=' + CONVERT(varchar, cast(b.dimn AS decimal(18, 0)))
     ELSE '' 
    END
    ) = a.dimension
    and a.CreatedDtTm = b.CreatedDtTm
    and b.active = 1 
    and b.barid = @BarId    
    ORDER BY
    substring(a.TypeSize,1,1) desc, 
    BarLength desc
    END
    END

Crystal 报告在我调试代码时不显示页面,如上所示。当我在 Sql 服务器中执行代码时,一切都正确执行。由于我在编程方面的知识有限。有人可以确定我面临的问题。

我已经通过添加这段代码 a.BarDetailId = b.BarDetailId and a.shapecode = b.shapecode 解决了这个问题并且它起作用了。