rdlc报表带参数打印
1、新建rdlc文件报表
2、选中rdlc文件=》视图=》报表资料

添加几个参数,如图

设计报表页面

int WaitNum = this.queueDTOs.Where(m=>m.QueueNo<queueDTO.QueueNo&&m.State ==0 && m.DoctorID == queueDTO.DoctorID).Count();
LocalReport report = new LocalReport();
//report.ReportPath = "GMJYPrint.rdlc";//或
report.ReportEmbeddedResource = "WFNurseStation.ReportFZ.rdlc";
report.SetParameters(new ReportParameter("QueueNO", queueDTO.QueueNo.ToString()));
report.SetParameters(new ReportParameter("WaitNum", WaitNum.ToString()));
report.SetParameters(new ReportParameter("DoctorName", queueDTO.DoctorName));
report.SetParameters(new ReportParameter("RoomName", queueDTO.RoomName));
report.SetParameters(new ReportParameter("PrintTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")));
Export(report);
Print();
if (m_streams == null || m_streams.Count == 0)
throw new Exception("打印不能为空");
PrintDocument printDoc = new PrintDocument();
if (!printDoc.PrinterSettings.IsValid)
{
throw new Exception("找不到默认打印机");
}
else
{
System.Drawing.Printing.PageSettings df = new System.Drawing.Printing.PageSettings();
df.PaperSize = new PaperSize("callPrint", (int)(90 / 25.4 * 100), (int)(100 / 25.4 * 100));//单位为0.01英寸,即0.254mm
printDoc.DefaultPageSettings = df;
printDoc.PrintPage += new PrintPageEventHandler(PrintPage);
m_currentPageIndex = 0;
printDoc.Print();
}
rdlc报表带参数打印的更多相关文章
- RDLC报表带搜索与传参数功能演示(ASP.NET MVC)
昨晚有演示了<ASP.NET MVC应用程序展示RDLC报表>http://www.cnblogs.com/insus/p/3665295.html RDLC报表.在实现过程中,有遇上了诸 ...
- 水晶报表和rdlc报表传入参数筛选
在使用报表向客户展示结果数据时,实时的在报表中显示某些特定的数据是必需的,如:显示的部门.打印的日期等.本文只简单的演示向报表内传入一个字符值. 以下是设计好报表之后传入参数的具体操作 一.首先是水晶 ...
- * 获取页面参数 * @return 参数打印
/** * 获取页面参数 * @return 参数打印 */ GetUrlParam: function(paraName) { var url = document.location.toStrin ...
- Logback设置SQL参数打印
一.hibernate中设置SQL参数打印: (主要是第一句) <logger name="org.hibernate.type.descriptor.sql.BasicBinder& ...
- RDLC中添加参数,用来显示报表中数据集之外的信息。
我添加了两个参数,首先后台: ReportParameter rp = ,,).ToString()); ReportParameter rp1 = new ReportParameter(" ...
- RDLC系列之七 条码打印
参考: C# 条码标签打印程序,RDLC报表动态显示多条码标签的方法 http://www.cnblogs.com/vice/p/4105898.html 我做的思路是:不使用数据库存储image的b ...
- js 传参报错 参数含有数字、字母组合的字符串SyntaxError: identifier starts immediately after numeric literal
报错的意思是标识符以数字开头,这是因为js是弱类型的语言当发现第一个数字是就自动转化为数字类型的但是其中还含有字符所以报了错,‘ 报错的原因是因为我们想传的字符串,但是js却当成数字,所以需要给传的参 ...
- AOP 实现请求参数打印
1.编写打印方法 import java.util.Enumeration; import javax.servlet.http.HttpServletRequest; import org.aspe ...
- pthread_create 报函数参数不匹配问题
pthread_create方法遇到类方法时总会报 argument of type ‘void* (Thread::)(void*)’ does not match ‘void* (*)(void ...
随机推荐
- docker for windows 容器内网通过独立IP直接访问的方法
Docker官方推荐我们通过端口映射的方式把Docker容器的服务提供给宿主机或者局域网其他容器使用.一般过程是: 1.Docker进程通过监听宿主机的某个端口,将该端口的数据包发送给Docker容器 ...
- Mac如何自定义本地化文件夹名
1. 关闭系统文件保护 在一切开始前,首先要先关闭掉系统的文件保护机制,否则无法修改系统文件,参见`如何关闭 Mac OS X EI Capitan 系统文件保护`这篇文章 2. 添加自定义本地化名称 ...
- 物联网学习笔记——构建RESTFul平台1
0.前言 前些时间顺着Yeelink学习了RESTFUL,使用PHP和Slim框架尝试实现简单的REST API,树莓派可通过GET方法获得JSON数据包,通过这种方式实现了树莓派和服务器(我 ...
- java文件相关(文件追加内容、文件内容清空、文件内容读取)
https://blog.csdn.net/xnz0616/article/details/39137177 1.文件内容追加 // 在已有的文件后面追加信息 public static void a ...
- 八 Hibernate延迟加载&抓取策略(优化)
面试:Hibernate效率很低,如何优化? 缓存怎么弄的,语句怎么优化? 聊聊一级缓存,聊聊抓取策略和延迟加载,聊聊批量抓取 延迟加载: 一般不单独使用,和延迟加载一起使用 延迟加载:lazy(懒加 ...
- SciPy 线性代数
章节 SciPy 介绍 SciPy 安装 SciPy 基础功能 SciPy 特殊函数 SciPy k均值聚类 SciPy 常量 SciPy fftpack(傅里叶变换) SciPy 积分 SciPy ...
- ubuntu 系统分配固定 ip--
由于Ubuntu重启之后,ip很容易改变,可以用以下方式固定ip地址 1.设置ip地址 vi /etc/network/interface # The loopback network interfa ...
- Ubuntu下使用mail命令发送邮件
Ubuntu下使用mail命令发送邮件 mail命令在Ubuntu下是需要安装的,使用下条命令进行安装: sudo apt-get install heirloom-mailx 接下来输入用户密码,等 ...
- Linux-lsxxx
Linux-lsxxx ls list directory contents 列出文件及目录 lsattr List file attributes on a Linux second extende ...
- 杭电oj1860:统计字符(字符串hash / 水题)
统计字符 题目链接 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem D ...