Crystal报表不显示页面

时间:2017-05-09 08:37:03

标签: sql crystal-reports boolean constraints alphanumeric

    @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

Error in Crystal Report

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

1 个答案:

答案 0 :(得分:0)

我已经通过添加此代码const publishClient = (resp, cb) => { console.log('Publishing ', resp); cb() } // Applying same process const format = (letter) => ({'letter': letter}); const concact = R.curry((num, letter) => num + '=' + letter); // my method publish const publish = partialRight(publishClient, [function() { console.log('Callback called!') }]); // conditions to check const condToRes = R.cond([ [equals(1), concact('A')], [equals(2), concact('B')], [equals(3), concact('C')], [equals(4), concact('D')], [equals(5), concact('E')], ]); // Publish only if condition resolves // const resolveCond = when(condToRes, pipe(format, publish)) // NOT WORK,concact FN is ignored! const resolveCond = pipe( // TRYING condToRes, when(HOW TO CHECK condToRes IS NOT NIL, pipe(format, publish)) ); // Call resolveCond(1) // SHOULD DISPLAY .. Publishing {"letter":"A=1"} Callback called! 解决了这个问题,但它确实有效。