Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
Bentley 中国优先社区
  • Welcome to Bentley Communities
  • Bentley's Communities
  • Bentley 中国优先社区
  • More
  • Cancel
Bentley 中国优先社区
技术资料库 原始电缆表两列合并一列导入,敷设完生成报表后再拆分为两列
    • Sign in
    Bentley 中国优先社区 requires membership for participation - click to join
    • -Bentley 中文技术资料库
      • AutoPipe
      • +Bentley Navigator
      • +Bentley Substation
      • +Bentley 道路与场地设计
      • -BRCM
        • +01-BRCM 介绍及更新动态
        • +02-BRCM 下载、安装与配置
        • +03-BRCM 快速入门指南
        • +04-桥架设计
        • 05-地下系统设计
        • +06-设备设计
        • +07-电缆设计
        • +08-二维出图模块
        • +09-报表模块
        • +BRCM软件使用
        • 原始电缆表两列合并一列导入,敷设完生成报表后再拆分为两列
      • +BridgeMasterModeler/OpenBridgeModeler
      • +Building Design
      • +i-model / DgnDb
      • +LumenRT/ContextCapture
      • +MicroStation
      • +MOSES
      • +OpenBridge
      • +OpenBuildings Designer
      • +OpenFlows
      • +OpenPlant
      • +OpenPlant Electrical CCK
      • +ProjectWise
      • +ProStructures
      • +SACS
      • +STAAD.Pro
      • +SYNCHRO
      • 中国优先产品汇总
      • +其它
      • +桥梁大师<BridgeMaster>
      • +现浇箱梁
      • +软件激活及授权
    • +iTwin 数字孪生平台
    • +中国优先社区使用指南
    • 产品技术简报(Newsletter)
    • +常用产品离线安装包分享
    • +常见问题汇总
    • +社区使用参考

     
     Questions about this article, topic, or product? Click here. 

    原始电缆表两列合并一列导入,敷设完生成报表后再拆分为两列

    1.在原始电缆表.xls文件中,利用CONCATENATE(A,";",B)函数来合并两列为一列,其中“;”为添加的分隔符,方便将来拆分

    2.编辑报表模板

    3.在报表中添加两列变量:tableCell13,tableCell19

    4.利用报表模板最左列的"A"命令,在报表区域外添加一label,在reportexploer的脚本中的“在打印前(beforescript)”中添加script,将此label中的参数拆分到其他两列中

    script示例如下:

    System.String pageD = "";
    System.String[] arrStr;

    private void lable7_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) {

    pageD = label7.Text;
        System.String[] arrStr = pageD.Split(';');    
        tableCell13.Text = arrStr[0];
        tableCell19.Text = arrStr[1];
    }

    示例中设了一变量pageD,增加一个数组,将label7的参数赋予pageD,并将pageD通过;来拆分,拆分后的参数存放于tableCell13和tableCell19中

    5.label变量可设置为不可见,在导入后的电缆清册中则不显示label变量

    6.结果如下图:

    • BRCM
    • Share
    • History
    • More
    • Cancel
    • Hongjun Meng Created by Bentley Colleague Hongjun Meng
    • When: Thu, Mar 9 2017 2:19 AM
    • Revisions: 1
    • Comments: 0
    Anonymous
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2021 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies