1、可以自定义一个新的数据源

  参考:

internal class VirtualDataSource : DataSourceBase
{
   private int FVirtualRowsCount;

   public int VirtualRowsCount
   {
     get { return FVirtualRowsCount; }
     set { FVirtualRowsCount = value; }
   }

   #region Protected Methods
   /// <inheritdoc/>
   protected override object GetValue(Column column)
   {
     return null;
   }
   #endregion

   #region Public Methods
   public override void InitSchema()
   {
    // do nothing
   }

   public override void LoadData(ArrayList rows)
   {
     rows.Clear();
     for (int i = 0; i < FVirtualRowsCount; i++)
     {
       rows.Add(0);
     }
   }
   #endregion
}

2、可以继承 TableDataSource    修改 LoadData 方法。

 

3、想要可视化设计,必须继承 DataConnectionBase 实现相应的方法。

public override string[] GetTableNames()

public override string QuoteIdentifier(string value, DbConnection connection)

public override Type GetConnectionType()

public override DbDataAdapter GetAdapter(string selectCommand, DbConnection connection,
  CommandParameterCollection parameters)

/// <inheritdoc/>
  public override ConnectionEditorBase GetEditor()
  {
    return new MsSqlConnectionEditor();
  }

  /// <inheritdoc/>
  public override Type GetParameterType()
  {
    return typeof(SqlDbType);
  }

  /// <inheritdoc/>
  public override int GetDefaultParameterType()
  {
    return (int)SqlDbType.VarChar;
  }

  /// <inheritdoc/>
  public override string GetConnectionId()
  {
    SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(ConnectionString);
    string info = builder.InitialCatalog;
    if (String.IsNullOrEmpty(info))
      info = builder.AttachDBFilename;
    return "MS SQL: " + info;
  }
}

FastReport 自定义数据集的更多相关文章

  1. torch_13_自定义数据集实战

    1.将图片的路径和标签写入csv文件并实现读取 # 创建一个文件,包含image,存放方式:label pokemeon\\mew\\0001.jpg,0 def load_csv(self,file ...

  2. Tensorflow2 自定义数据集图片完成图片分类任务

    对于自定义数据集的图片任务,通用流程一般分为以下几个步骤: Load data Train-Val-Test Build model Transfer Learning 其中大部分精力会花在数据的准备 ...

  3. pytorch加载语音类自定义数据集

    pytorch对一下常用的公开数据集有很方便的API接口,但是当我们需要使用自己的数据集训练神经网络时,就需要自定义数据集,在pytorch中,提供了一些类,方便我们定义自己的数据集合 torch.u ...

  4. MMDetection 快速开始,训练自定义数据集

    本文将快速引导使用 MMDetection ,记录了实践中需注意的一些问题. 环境准备 基础环境 Nvidia 显卡的主机 Ubuntu 18.04 系统安装,可见 制作 USB 启动盘,及系统安装 ...

  5. Scaled-YOLOv4 快速开始,训练自定义数据集

    代码: https://github.com/ikuokuo/start-scaled-yolov4 Scaled-YOLOv4 代码: https://github.com/WongKinYiu/S ...

  6. PyTorch 自定义数据集

    准备数据 准备 COCO128 数据集,其是 COCO train2017 前 128 个数据.按 YOLOv5 组织的目录: $ tree ~/datasets/coco128 -L 2 /home ...

  7. FastReport自定义数据源及ListView控件的使用

    ##1.想批量生成一堆物资信息卡,效果如下图所示,fastreport可以一下全部生成,并且发现不用单独写东西, ##2.发现FastReport官方给出的Demo.exe很友好,基本可以满足要求,想 ...

  8. [炼丹术]YOLOv5训练自定义数据集

    YOLOv5训练自定义数据 一.开始之前的准备工作 克隆 repo 并在Python>=3.6.0环境中安装requirements.txt,包括PyTorch>=1.7.模型和数据集会从 ...

  9. yolov5训练自定义数据集

    yolov5训练自定义数据 step1:参考文献及代码 博客 https://blog.csdn.net/weixin_41868104/article/details/107339535 githu ...

随机推荐

  1. PHP Problem with the SSL CA cert (path? access rights?)

    1.php使用curl模块报错问题 开发遇到问题,直接使用系统的curl命令正常,使用php的curl模块报错 错误:PHP Problem with the SSL CA cert (path? a ...

  2. NSDate和NSDateFormatter 相关应用代码示例

    此方法用来计算当前时间与目标时间的先后顺序: -(NSDate *)calculateTimeWithCurrentTime:(NSDate *)currentDate{ //将当前时间转为本地时区 ...

  3. ROCKETMQ源码分析笔记1:tools

    rocketmq源码解析笔记 大家好,先安利一下自己,本人男,35岁,已婚.目前就职于小资生活(北京),职位是开发总监. 姓名DaneBrown 好了.我保证本文绝不会太监!转载时请附上以上安利信息. ...

  4. 在Linux/Windows系统上编辑/etc/hosts文件

    Linux ubuntu16 open the terminal, input the command: sudo -i gedit /etc/hosts file click enter key, ...

  5. mysql导入乱码问题,centOS

    CREATE DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;mysql -uroot -p --default ...

  6. h5移动端让文字不可选中复制

    可以用css属性来控制 -moz-user-select:none; -webkit-user-select:none;

  7. 关于php的开源

    这里的开源是指编写php的C语言的源代码是开放的,你可以下载下来c源代码去修改然后重新编译连接得到自己的程序. 比如php不支持多线程一直是广为被人所诟病的,你也可以让它变相的支持多线程,比如face ...

  8. 远程执行shellcode

    #include "Windows.h" #include <WinSock2.h> #include <stdio.h> #pragma comment( ...

  9. c++并发练习---生产者消费者模型

    问题:有一个生产者,多个消费者,生产者每生产一个,放入队列,多个消费者顺序从队列中取出数据,打印最终结果. 分析:首先这题,我本意应该设计成如下模型:生产者单开一个线程,向队列中放入数据,而消费者在锁 ...

  10. 未解决的问题,登录163邮箱http://mail.163.com/,用xpath的方式定位密码输入框的时候,总是报找不到该元素

    退出的时候出现: xpath定位方法: 注意xpath路径写的太长,如果层级全部写完定位不到,就尝试去掉一些层级