【问题标题】:Report Builder 3.0 Creating a expressions with different data typesReport Builder 3.0 创建具有不同数据类型的表达式
【发布时间】:2016-04-06 18:53:29
【问题描述】:

我在 Report Builder 3.0 中的报表的 SQL 中添加了 4 个字段。前 3 个字段是 Decimal (5),最后一个是 Varchar (81)。报告运行良好,但我想在布局中的表达式中组合 4 个字段。这就是我所拥有的:

=Fields!TEAM_ID.Value & '  ' & Fields!GRP_ID.Value & '  ' & Fields!TERR_ID.Value & '  ' & Fields!LNAM.Value

当我尝试运行报告时,我收到一条错误消息,上面写着“值表达式....包含错误。预期表达。

我有两个问题:

(1) 这个表达式有什么问题? (2) 如何用 0(零)支付前 3 个字段。前 3 个字段中的每一个都应该是 3 个字符长,例如,76 应该是 076,1 应该是 001,等等。

谢谢你的帮助............

【问题讨论】:

    标签: expression reportbuilder3.0


    【解决方案1】:

    1) 你应该使用双引号而不是单引号

    2) 使用 Format() 函数

    =Format(Fields!TEAM_ID.Value,"000") & "  " & Format(Fields!GRP_ID.Value,"000") & "  " & Format(Fields!TERR_ID.Value,"000") & "  " & Fields!LNAM.Value
    

    【讨论】:

      猜你喜欢
      • 2013-09-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多