zoukankan      html  css  js  c++  java
  • stimulsoft Report报表使用笔记

    1.使用设计器设计mrt报表模板,或者从其他文件复制修改

    2.删除business object 数据源

    3.使用代码添加数据源

    ParcelChangeItem change = new ParcelChangeItem();
    string filename = @"D:workixxx信息.mrt";
    Stimulsoft.Report.StiReport report = new StiReport();
    report.Load(filename);
    report.Dictionary.Clear();
    report.RegBusinessObject("parcel", parcel);
    report.Dictionary.SynchronizeBusinessObjects(1);
    report.Dictionary.Synchronize();
    report.Save(filename);

    4.再绑定报表各字段,字段上右键,选设计。

    5.使用

    RegcardEx aa = new RegcardEx()
    {
      ExIndex = "22",
      RegDate = "2015-9-9",
      RegType = "初始登记",
      RegContent = "aaaaa"
    };
    RegcardParcel parcel = new RegcardParcel()
    {
      ParcelCode = "aaaaaa",
      IsAreaUnitSquaremeter = true, 
      OwnerName = "xt张三",
      CardExItem = aa
    };
    StiReport report = new StiReport();
    report.Load(@"F:stimulsoft报表报表模板土地登记卡.mrt");
    report.RegBusinessObject("land", "Regcard", parcel);
    report.Compile();
    report.Render(true);
    report.Show();

    注意,定义的对象,类名,与报表里的名称关键字不可以重名,否则报对象已存在错误。

    其他类型使用待补充

    列表及底部边线

    List<RegcardEx> cers = new List<RegcardEx>() {
    new RegcardEx(){ExIndex = "22",RegDate = "2015-9-9",RegType = "初始登记",RegContent = "aaaaa" },
    new RegcardEx(){ExIndex = "22",RegDate = "2015-9-9",RegType = "初始登记",RegContent = "aaaaa" },
    new RegcardEx(){ExIndex = "22",RegDate = "2015-9-9",RegType = "初始登记",RegContent = "aaaaa" },
    new RegcardEx(){ExIndex = "22",RegDate = "2015-9-9",RegType = "初始登记",RegContent = "aaaaa" },
    };
    StiReport report = new StiReport();
    report.Load(@"F:stimulsoft报表报表模板土地登记卡续表.mrt");
    report.RegBusinessObject("land", "cardex", cers);
    report.Compile();
    report.Render(true);
    report.Show();
    }

  • 相关阅读:
    vue_源码 原理 剖析
    vue_vuex
    vue_VueRouter 路由_路由器管理n个路由_并向路由组件传递数据_新标签路由_编程式路由导航
    vue_mint-ui
    vue_ajax 请求
    vue_组件间通信:自定义事件、消息发布与订阅、槽
    vue_小项目_吃饭睡觉打豆豆
    vue-cli 脚手架 Command Line Interface
    程序员面试金典-面试题 04.03. 特定深度节点链表
    程序员面试金典-面试题 04.02. 最小高度树
  • 原文地址:https://www.cnblogs.com/yansc/p/5959648.html
Copyright © 2011-2022 走看看