FastReport 自定义数据集
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 自定义数据集的更多相关文章
- torch_13_自定义数据集实战
1.将图片的路径和标签写入csv文件并实现读取 # 创建一个文件,包含image,存放方式:label pokemeon\\mew\\0001.jpg,0 def load_csv(self,file ...
- Tensorflow2 自定义数据集图片完成图片分类任务
对于自定义数据集的图片任务,通用流程一般分为以下几个步骤: Load data Train-Val-Test Build model Transfer Learning 其中大部分精力会花在数据的准备 ...
- pytorch加载语音类自定义数据集
pytorch对一下常用的公开数据集有很方便的API接口,但是当我们需要使用自己的数据集训练神经网络时,就需要自定义数据集,在pytorch中,提供了一些类,方便我们定义自己的数据集合 torch.u ...
- MMDetection 快速开始,训练自定义数据集
本文将快速引导使用 MMDetection ,记录了实践中需注意的一些问题. 环境准备 基础环境 Nvidia 显卡的主机 Ubuntu 18.04 系统安装,可见 制作 USB 启动盘,及系统安装 ...
- Scaled-YOLOv4 快速开始,训练自定义数据集
代码: https://github.com/ikuokuo/start-scaled-yolov4 Scaled-YOLOv4 代码: https://github.com/WongKinYiu/S ...
- PyTorch 自定义数据集
准备数据 准备 COCO128 数据集,其是 COCO train2017 前 128 个数据.按 YOLOv5 组织的目录: $ tree ~/datasets/coco128 -L 2 /home ...
- FastReport自定义数据源及ListView控件的使用
##1.想批量生成一堆物资信息卡,效果如下图所示,fastreport可以一下全部生成,并且发现不用单独写东西, ##2.发现FastReport官方给出的Demo.exe很友好,基本可以满足要求,想 ...
- [炼丹术]YOLOv5训练自定义数据集
YOLOv5训练自定义数据 一.开始之前的准备工作 克隆 repo 并在Python>=3.6.0环境中安装requirements.txt,包括PyTorch>=1.7.模型和数据集会从 ...
- yolov5训练自定义数据集
yolov5训练自定义数据 step1:参考文献及代码 博客 https://blog.csdn.net/weixin_41868104/article/details/107339535 githu ...
随机推荐
- 如何静态添加toolbar到datagrid
这个示例向你展示如何添加toolbar到datagrid. 创建 DataGrid <table id="tt" class="easyui-datagrid&qu ...
- 显示Class 'Think\Controller\FuController' not found和Call to a member function assign() on a non-object 的错误问题
Class 'Think\Controller\FuController' not found 错误位置 FILE: D:\wamp\www\tinkphp\Application\Come\Cont ...
- PHP网页
1.安装YUM源 2.安装httpd与PHP yum install httpd -y yum install php -y 3.进入htmi文件中 cd /var/www/html/ 4.将自己编写 ...
- wordcount 过程
hdfs原始数据 hello a hello b map阶段: 输入数据:<0,"hello a"> <8,"hello b"> key ...
- JavaScript的chapterII
程序流程控制: 1.条件语句——if if(condition) {statement1} else {statement2} 例子: if(i<60 && ...
- 解决file_get_contents遇到中文文件名无法打开问题
利用file_get_contents打开文件或采集远程服务器文件如果文名或url中碰到汉字中文那么会出现failed to open stream:Lnvalid argument in错误. ...
- CheckBox复选框全选以及获取值
<html> <head> <meta http-equiv="Content-Type" content="text/html; char ...
- 慕课网__css_ float
- zend studio 10破解/汉化
http://blog.csdn.net/qq1355541448/article/details/16807429
- python函数默认参数坑
def add(a=3,b): print a,b add(4) 这样写的话,运行的话就会报错:SyntaxError: non-default argument follows default ar ...