C# winfrom FastReport Print
1、引用
using FastReport;
using FastReport.Barcode;
2、code
private void toolStripButtonPrint_Click(object sender, EventArgs e)
{
string textNewdate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
string textBarcode=string.Empty;
try
{
//seleCord = this.dataGridView1.SelectedRows[0].Cells[1].Value.ToString();//选中行的第一个单元格的值
string StrSql = "SELECT PID, SN, WorkNo, Name, Sex_Name, IDCard, Age, Education_Name, CONVERT(varchar(100), EntryDate, 23) as EntryDate," + "UseManFrom_Name, Post_Name, jobs_Name,TypeWork_Name, IDCardAdress, Mobile, "
+ "Security_Name, ContractTerm_Name,BrithDate, Sex, Education, UseManFrom, Post, Jobs, TypeWork, Security," + "ContractTerm,WorkDate,Nation,Duty,WorkTelphone,HomeTelphone,Email,WorkAddress, HomeAddress,"
+"Memo, Photo, IDCardImage"
+ " FROM tbEmployee where PID='" + iPid + "'"; Report FsReport = new Report();//实例化打印报表 SqlHelper helper = new SqlHelper();
ds = SqlHelper.SqlGetDataSet(StrSql, "v_tbEmployee");
//sda.Fill(dt,"tbDevCard");
//string reportpath = AppDomain.CurrentDomain.BaseDirectory+"\OtDevPgCard.frx";
//FsReport.Load(@"..\OtDevPgCard.frx");
FsReport.Load(@"FastReport\OtEmpEdit.frx");
FsReport.RegisterData(ds);
dt = ds.Tables[];
TextObject pTextPrint = FsReport.FindObject("TextPrintDate") as TextObject;
//TextObject pTextIDCard = FsReport.FindObject("TextIDCard") as TextObject;
textBarcode = dt.Rows[]["IDCard"].ToString(); //(FsReport.FindObject("Barcode2") as BarcodeObject).Text = "21000002009"; // strArray[3];
(FsReport.FindObject("Barcode2") as BarcodeObject).Text = textBarcode;
//pTextIDCard.Text = textBarcode;
pTextPrint.Text = textNewdate;
FsReport.Show();
FsReport.Dispose();
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}
}
C# winfrom FastReport Print的更多相关文章
- C# winfrom FastReport 变量设计加载
1.源码 DataTable dt5 = new DataTable(); dt5 = SqlHelper.SqlGetDataTable(StrSql, "tbEmpCont") ...
- 使用FastReport.net 报表在网页上实现打印功能
这些年的工作当中,最早是在8年前接触到FastReport这个报表工具,从名字上来看,直译过来就是快速报表,正所谓天下武功,唯快不破,FastReport报表早些年确实是制作报表的不二之选,8年前的工 ...
- winfrom调用FastReport模板
'存放模板的路径 If Dir(Application.StartupPath & "\ReportsFile\HB\01\IN.frx", FileAttribute.N ...
- MVC架构 使用FastReport
1.Web.config文件 添加配置 <httpHandlers> <add path="FastReport.Export.axd" verb="* ...
- FastReport 使用说明
FastReport TfrxReport 此为最主要的报表元件,一个 TfrxReport 元件组成一份报表.在设计时期,双击此 元件可打开报表设计器(Report Designer),此元件拥有所 ...
- FastReport 使用技巧篇
使用技巧篇 1.FastReport中如果访问报表中的对象? 可以使用FindObject方法. TfrxMemoView(frxReport1.FindObject('memo ...
- FASTREPORT 整理 (mtm)
DELPHI中用FASTREPORT制作报表 1.加载并存储报表 默认情况下,报表窗体同项目窗体构存储在同一个DFM文件中.多数情况下,无须再操作,因而你就不必采用特殊方法加载报表. 如果你决定在文 ...
- FastReport经验
FastReport经验 1.FastReport中如果访问报表中的对象? 可以使用FindObject方法. TfrxMemoView(frxReport1.FindObject(’memo1′)) ...
- FastReport使用一——简介
一:FastReport Designer用法简介 1.使用FastReport.Net4文件夹下的Designer.exe进行模版的创建工作 图1 图1中,右键删除除==>数据区 之外的其他区 ...
随机推荐
- DBUtiles中的简单使用(QueryRunner和ResultSetHandler的手动实现)
DBUtiles是一个很好的处理JDBC的工具类.(DbUtils is a small set of classes designed to make working with JDBC easie ...
- C++中容器的使用(一)
C++中有两种类型的容器:顺序容器和关联容器. 顺序容器主要有vector.list.deque等.其中vector表示一段连续的内存,基于数组实现,list表示非连续的内存,基于链表实现,deque ...
- 使用kibana进行简单的CRUD和版本控制
使用: ##创建文档之前先创建索引 PUT /toov5 ##查询索引 GET /toov5 ##创建文档 /索引/类型/id PUT /toov5/user/1 { "name" ...
- BZOJ4311:向量
题意:要求支持三个操作,加入删除一个向量,询问当前向量与给定向量的最大值. 题解:线段树时间分治,每个区间做一个凸包,查询的时候到对应区间的凸包上三分. (话说我这个可能有点问题,三分那一块R-L&g ...
- MapReduce-shuffle过程详解
Shuffle map端 map函数开始产生输出时,并不是简单地将它写到磁盘.这个过程很复杂,它利用缓冲的方式写到内存并出于效率的考虑进行预排序.每个map任务都有一个环形内存缓冲区用于存储任务输出. ...
- jsp连接sqlServer数据库教程、jsp连接sqlServer数据库报ClassNotFoundException异常
jsp连接sqlServer数据库教程: 首先讲下我用的工具版本以供参考: jar包:jtds1.3.1.jar 下载地址:点击进入 数据库:SQL Server2012 服务器:Tomcat8.0 ...
- SQL Server 2016 —— 聚集列存储索引的功能增强
作者 Jonathan Allen,译者 邵思华 发布于 2015年6月14日 聚集列存储索引(CC Index)是SQL Server 2014中两大最引 ...
- django实现日期分类效果
日期分类效果图 实现功能:能够按照月份进行分类,统计每个月份的文章数量,没有文章的月份不显示.点击每栏可以链接的当月的文章列表. 每月文章列表可以使用django的通用视图MonthArticleVi ...
- 10 个 SQL 注入工具
BSQL Hacker BSQL Hacker是由Portcullis实验室开发的,BSQL Hacker 是一个SQL自动注入工具(支持SQL盲注),其设计的目的是希望能对任何的数据库进行SQL溢出 ...
- win32下开发hadoop
转载自:http://my.oschina.net/muou/blog/408543[木偶:Windows下使用Hadoop2.6.0-eclipse-plugin插件] 对于一些细节地 ...