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 ...
随机推荐
- MyEclipse插件github安装使用
MyEclipse插件github安装使用 网络上的介绍一堆堆的,但是自己尝试了下,发现问题很多,就动手做个教程. 大纲 1.git客户端安装 2.ssh配置 3.egit安装配置 4.参考资料 ...
- WPF学员管理系统
下载
- Linux关于文件处理命令
一.登陆用户和机器名称 示例:[root@hadoop01 ~]# root:表示用户名 @hadoop01表示机器名称 ~表示当前文件目录是家目录 #表示输入命令提示符,用户可以在其后输入命令:非r ...
- Python学习笔记之基础篇(二)python入门
一.pycharm 的下载与安装: 使用教程:https://www.cnblogs.com/jin-xin/articles/9811379.html 破解的方法:http://xianchang. ...
- 解题报告:luogu P2299
题目链接:P2299 Mzc和体委的争夺战 单源最短路板子题吗,体面晦涩难懂(语文不好),以为是有向图,只有\(30pts\),其实是无向的,我使用了刚学来的\(SPFA\),通过了此题: \(Cod ...
- css文字实例锦集
在画布上创建向上的3D拉影文字 <canvas id="myCanvas" width="410" height="130">& ...
- solus linux 更新源
添加源(清华大学开源软件镜像)sudo eopkg ar Solus https://mirrors.tuna.tsinghua.edu.cn/solus/shannon/eopkg-index.xm ...
- php导出合同模板到excel
/** * [export_excel 合同导出] * [@param itemid:单号] * @return [type] */ public function export_excel() { ...
- SpringBoot---条件(th:if)
Thymeleaf 的条件判断是 通过 th:if 来做的,只有为真的时候,才会显示当前元素 <p th:if="${testBoolean}" >如果testBool ...
- 爬虫(十六):Scrapy框架(三) Spider Middleware、Item Pipeline
1. Spider Middleware Spider Middleware是介入到Scrapy的Spider处理机制的钩子框架. 当Downloader生成Response之后,Response会被 ...