找回密码
 立即注册

QQ登录

只需一步,快速开始

weisheng

注册会员

3

主题

30

帖子

126

积分

注册会员

积分
126

微信认证勋章

weisheng
注册会员   /  发表于:2016-5-25 15:11  /   查看:3587  /  回复:7
Hi,Could you please read the following code? Does this code robust?
we sometimes print empty report, does dt=null cause this problem?

internal C1.C1Report.C1Report _c1r = null;
DataTable dt = new DataTable(_c1r.ReportName);
//here put data into dt.

_c1r.DataSource.Recordset = dt.DefaultView;
  dt = null;

  _c1r.Document.PrinterSettings.PrinterName = _printerName;
_c1r.Document.Print();

7 个回复

倒序浏览
Alice
社区贡献组   /  发表于:2016-5-25 18:09:37
沙发
Thanks for your reply.
From your description, you can see the demo in your computer as following, the path is:
\Documents\ComponentOne Samples\WinForms\C1Report\C1Report\Cs\DataSourceInspector
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
weisheng
注册会员   /  发表于:2016-5-27 10:34:34
板凳
我们打印出来的报告有两个字段有时候是空,然后再打印又不为空了,这2个字段的格式是rtf格式,我们现在用的版本是4.6.20131.54624,请问这个版本有这个问题吗? 怎么排查?
回复 使用道具 举报
Alice
社区贡献组   /  发表于:2016-5-27 12:03:21
地板
weisheng 发表于 2016-5-27 10:34
我们打印出来的报告有两个字段有时候是空,然后再打印又不为空了,这2个字段的格式是rtf格式,我们现在用的 ...

首先,您可以下载最新版查看是否有问题:
http://www.gcpowertools.com.cn/products/download.aspx?pid=3

根据您的描述,您的问题有时出现,您可以看看出现问题和没问题的区别,先让问题必然重现。
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
weisheng
注册会员   /  发表于:2016-5-30 14:50:04
5#
********2016-05-28 16:17:58,999 INFO  - '1024'-'Report'-'0'-'17:58.999 tReport__WYS:       左髋、 左膝关节诸组成骨排列规整,骨质结构完整,未见明显骨折征象,关节面光整,关节间隙可。'-'RptEditorImpl.cs'-'0'
********2016-05-28 16:17:58,999 INFO  - '1024'-'Report'-'0'-'17:58.999 tReport__WYG :左髋、左膝关节骨质未见明显骨折'-'RptEditorImpl.cs'-'0'
********2016-05-28 16:17:58,999 INFO  - '1024'-'Report'-'0'-'17:58.999 tReport__WYS:{\rtf1\ansi\ansicpg936\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}{\f1\fnil\fcharset134 \'cb\'ce\'cc\'e5;}{\f2\fnil\fcharset134 aa;}}
\viewkind4\uc1\pard\lang2052\kerning24\f0\fs24        \f1\'d7\'f3\'f7\'c5\'a1\'a2\f0  \lang1\f2\'d7\'f3\'cf\'a5\'b9\'d8\'bd\'da\'d6\'ee\'d7\'e9\'b3\'c9\'b9\'c7\'c5\'c5\'c1\'d0\'b9\'e6\'d5\'fb\'a3\'ac\'b9\'c7\'d6\'ca\'bd\'e1\'b9\'b9\'cd\'ea\'d5\'fb\'a3\'ac\'ce\'b4\'bc\'fb\'c3\'f7\'cf\'d4\'b9\'c7\'d5\'db\'d5\'f7\'cf\'f3\'a3\'ac\'b9\'d8\'bd\'da\'c3\'e6\'b9\'e2\'d5\'fb\'a3\'ac\'b9\'d8\'bd\'da\'bc\'e4\'cf\'b6\'bf\'c9\'a1\'a3\par
}
'-'RptEditorImpl.cs'-'0'
********2016-05-28 16:17:58,999 INFO  - '1024'-'Report'-'0'-'17:58.999 tReport__WYG :{\rtf1\ansi\ansicpg936\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fnil\fcharset134 aa;}}
\viewkind4\uc1\pard\lang9\kerning24\f0\fs24\'d7\'f3\'f7\'c5\'a1\'a2\'d7\'f3\'cf\'a5\'b9\'d8\'bd\'da\'b9\'c7\'d6\'ca\'ce\'b4\'bc\'fb\'c3\'f7\'cf\'d4\'b9\'c7\'d5\'db\par
}

通过r1report datasouce得到的rtf内容如上,请帮忙分析一下。
回复 使用道具 举报
Alice
社区贡献组   /  发表于:2016-5-30 17:24:44
6#
weisheng 发表于 2016-5-30 14:50
********2016-05-28 16:17:58,999 INFO  - '1024'-'Report'-'0'-'17:58.999 tReport__WYS:       左髋、 左 ...

很抱歉不能重现你的问题。
你发一个可以重现的Demo和测试步骤给我,我帮你测试下。
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
weisheng
注册会员   /  发表于:2016-6-1 16:07:44
7#
有可能是字体导致的问题。
回复 使用道具 举报
Alice
社区贡献组   /  发表于:2016-6-1 17:31:08
8#
weisheng 发表于 2016-6-1 16:07
有可能是字体导致的问题。

谢谢您的反馈。
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部