找回密码
 立即注册

QQ登录

只需一步,快速开始

credream

中级会员

110

主题

296

帖子

828

积分

中级会员

积分
828

活字格认证

credream
中级会员   /  发表于:2017-11-17 15:35  /   查看:6339  /  回复:11
ActiveReport2.0中的rpt.Printer.PaperBins
rpt.Printer.PaperBinNames
rpt.Printer.PaperBinNames(i)

arviewer1.Printer.SetupDialog

上面这些属性,在ActiveReport11中,好像没有了对吗?
怎么在AR11中对应,客户要求升级的程序中,必须要跟原来一样

但好像有个Grapecity.activereport.SystemPrinter,可以用这个吗?具体使用方法给说说吧

11 个回复

倒序浏览
KearneyKang讲师达人认证 悬赏达人认证
超级版主   /  发表于:2017-11-20 09:36:05
沙发
您好!AR2是很久以前的版本,您问的是关于打印的问题是吧!
现在打印后台代码是这样的:
  1. string file_name = @"..\..\PageReport1.rdlx";
  2. GrapeCity.ActiveReports.PageReport pageReport = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(file_name));
  3. GrapeCity.ActiveReports.Document.PageDocument pageDocument = new GrapeCity.ActiveReports.Document.PageDocument(pageReport);
  4. pageDocument.Print(true, true, false);
复制代码

回复 使用道具 举报
credream
中级会员   /  发表于:2017-11-20 14:33:57
板凳
你好,不是的,我们要实现类似于AR2的,打印,客户的成语是用Ar2做的,我们给他升级以后,要尽可能跟原来保持一致,有办法调用出printer的setupdialog嘛?还有paperbins,这个好像是获取打印机纸盒的吧,有些特殊的打印机需要用
回复 使用道具 举报
credream
中级会员   /  发表于:2017-11-20 15:32:26
地板
KearneyKang 发表于 2017-11-20 09:36
您好!AR2是很久以前的版本,您问的是关于打印的问题是吧!
现在打印后台代码是这样的:

你好,不是的,我们要实现类似于AR2的,打印,客户的成语是用Ar2做的,我们给他升级以后,要尽可能跟原来保持一致,有办法调用出printer的setupdialog嘛?还有paperbins,这个好像是获取打印机纸盒的吧,有些特殊的打印机需要用
回复 使用道具 举报
KearneyKang讲师达人认证 悬赏达人认证
超级版主   /  发表于:2017-11-20 16:06:51
5#
您好,您在AR2中用的是区域报表吧。目前最新的AR11的接口不可能跟AR2时一样,但是对于Printer的设置是可以进行设置的。              
  1. GrapeCity.ActiveReports.SectionReport sectionreport = new GrapeCity.ActiveReports.SectionReport();
  2.                         sectionreport.LoadLayout(fullPath);
  3.                         sectionreport.DataSource = dv;
  4.                         sectionreport.Run();

  5.                         GrapeCity.ActiveReports.Document.SectionDocument document = new GrapeCity.ActiveReports.Document.SectionDocument();
  6.                         for (int i = 0; i < sectionreport.Document.Pages.Count; i++)
  7.                         {
  8.                             document.Pages.Add(sectionreport.Document.Pages[i]);
  9.                         }
  10.                         if (printerName != "")
  11.                             document.Printer.PrinterSettings.PrinterName = printerName;
  12.                         LogHelper.WriteLog("after paperkind");
  13.                         document.Printer.PrinterName = "";
  14.                         document.Printer.PrinterSettings.Copies = 1;
  15.                         document.Printer.PaperKind = 0;
  16.                         document.Printer.PaperSize.RawKind = 0;
  17.                         document.Printer.OriginAtMargins = true;
  18.                         document.Printer.PaperSize.Width = (int)(Convert.ToDouble(documentxml.SelectSingleNode("ActiveReportsLayout").Attributes["PrintWidth"].Value) / 14.4);
  19.                         document.Printer.PaperSize.Height = (int)(Convert.ToDouble(documentxml.SelectSingleNode("ActiveReportsLayout//Sections//Section").Attributes["Height"].Value) / 14.4);
  20.                         LogHelper.WriteLog("before print:" + printerName);                        
  21.                         GrapeCity.ActiveReports.PrintExtension.Print(document, false, false);
复制代码
附件是一个区域报表关于打印的设置,希望可以给你提供参考

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
credream
中级会员   /  发表于:2017-11-20 19:55:18
6#
KearneyKang 发表于 2017-11-20 16:06
您好,您在AR2中用的是区域报表吧。目前最新的AR11的接口不可能跟AR2时一样,但是对于Printer的设置是可以 ...

打印的设置都了解,但现在有个问题就是,怎么可以显示出打印机设定画面,以及怎么设置打印机的纸盒,也就是原来的rpt.printer.setupdialog功能,和rpt.printer.paperbins,rpt.printer.paperbinNames功能,在现在新版本的ar中如何实现
回复 使用道具 举报
KearneyKang讲师达人认证 悬赏达人认证
超级版主   /  发表于:2017-11-21 09:32:23
7#
本帖最后由 KearneyKang 于 2017-11-29 10:04 编辑

您好!您现在是想给原来的产品做一个升级是吧!
回复 使用道具 举报
KearneyKang讲师达人认证 悬赏达人认证
超级版主   /  发表于:2017-11-21 12:12:01
9#
好的
回复 使用道具 举报
credream
中级会员   /  发表于:2017-11-22 13:16:20
10#
KearneyKang 发表于 2017-11-21 09:32
您好!您现在是想给原来的产品做一个升级是吧!要不我们QQ上进行一个技术的探讨,这样更方便大家的交流。QQ ...

你好,问了嘛,通过api之类的可以实现嘛
回复 使用道具 举报
credream
中级会员   /  发表于:2017-11-22 13:17:15
11#
KearneyKang 发表于 2017-11-21 09:32
您好!您现在是想给原来的产品做一个升级是吧!要不我们QQ上进行一个技术的探讨,这样更方便大家的交流。QQ ...

你好,问了嘛,通过api之类的可以实现嘛
回复 使用道具 举报
12下一页
您需要登录后才可以回帖 登录 | 立即注册
返回顶部