找回密码
 立即注册

QQ登录

只需一步,快速开始

sharksoftster

注册会员

1

主题

4

帖子

33

积分

注册会员

积分
33
最新发帖
sharksoftster
注册会员   /  发表于:2017-4-8 12:39  /   查看:4868  /  回复:6
使用C1Report设计报表,需要根据查询到的jpg图像文件(文件名)动态插入到报表中指定位置,C1ReportDesiner该怎么进行处理?
或者通过C#该如何控制?
生成PDF部分代码如下:
XmlDocument xdPrintTemplate = new XmlDocument();
xdPrintTemplate.Load(ReportTemplateName);
using (C1Report report = new C1Report())
{                 
     report.Load(xdPrintTemplate, "template");
     report.DataSource.Recordset = dsReport.Tables[0];
     report.RenderToFile(strPDFName, C1.C1Report.FileFormatEnum.PDF);
     report.Clear();
     report.Dispose();
}

6 个回复

倒序浏览
Alice
社区贡献组   /  发表于:2017-4-10 13:57:14
沙发
谢谢您的反馈。
请问您是打算使用在哪个平台下?WinForm?
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
sharksoftster
注册会员   /  发表于:2017-4-24 11:29:33
板凳
Alice 发表于 2017-4-10 13:57
谢谢您的反馈。
请问您是打算使用在哪个平台下?WinForm?

使用webservice去生成报表,然后将报表转化为PDF文件。
回复 使用道具 举报
sharksoftster
注册会员   /  发表于:2017-4-24 13:47:57
地板
Alice 发表于 2017-4-10 13:57
谢谢您的反馈。
请问您是打算使用在哪个平台下?WinForm?

还有一个情况麻烦帮忙解答下,C1Report通过webservice生成报表并保存为PDF文件后,生成的PDF文件有时候会有Component的水印,但是在安装后已经激活了,winform发布程序生成的PDF文件倒没有发现有水印,这个是个什么情况?
回复 使用道具 举报
Alice
社区贡献组   /  发表于:2017-4-24 13:50:11
5#
本帖最后由 Alice 于 2017-4-24 13:51 编辑
sharksoftster 发表于 2017-4-24 11:29
使用webservice去生成报表,然后将报表转化为PDF文件。
首先你需要添加一个图片,C1Report只是负责把你已有的图片添加到报表

图片可以通过代码添加,代码参考:

  1. //Add Image field to the report
  2. Field Image1;
  3. Section s1 = C1WebReport1.Report.Sections[SectionTypeEnum.PageFooter];
  4. Image1 = s1.Fields.Add("Image1", "", 50, 50, 4440, 1480);
  5. Image1.Width = 4440;
  6. Image1.Height = 1480;
  7. //Image1.BackColor = System.Drawing.Color.Blue;
  8. Image1.PictureScale = PictureScaleEnum.Scale;
  9. Image1.Picture = _tmpImage;
复制代码
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
sharksoftster
注册会员   /  发表于:2017-4-24 20:32:03
6#
Alice 发表于 2017-4-24 13:50
首先你需要添加一个图片,C1Report只是负责把你已有的图片添加到报表

图片可以通过代码添加,代码参考: ...

好的,谢谢!
回复 使用道具 举报
Alice
社区贡献组   /  发表于:2017-4-25 11:54:50
7#

不用客气。
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

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