找回密码
 立即注册

QQ登录

只需一步,快速开始

tysoft

中级会员

84

主题

214

帖子

678

积分

中级会员

积分
678

活字格认证微信认证勋章元老葡萄

tysoft
中级会员   /  发表于:2017-7-7 09:39  /   查看:2935  /  回复:1
            XmlDocument doc_A = new XmlDocument();
            doc_A.Load("E:\\AntelopClient\\reports\\A.xml");
            C1Report RA = new C1Report();
            RA.Load(doc_A, "条形图");
            System.Drawing.Imaging.Metafile[] pagesA=RA.GetPageImages().ToArray();
            
            获取报表页时发现有异常,有时可以取到,再次运行时候RA.GetPageImages()为空,请看下什么原因?


1 个回复

倒序浏览
JeffryLI
葡萄城公司职员   /  发表于:2017-7-7 10:40:26
沙发
您好:C1Report可以直接加载模板的。您是尝试这样的方式,希望能帮到您。
  1. <p> // load the reports
  2.       c1Report1.Load("Report1.xml", "ReportName");
  3.       this.c1Report1.Render();

  4.       // the margins are set to zero to compensate for the margins already present in the reports
  5.       c1PrintDocument1.PageLayout.PageSettings.LeftMargin = "0.0in";
  6.       int i;
  7.       int count=c1Report1.GetPageCount() ;
  8.       Pages = new System.Drawing.Imaging.Metafile[count];
  9. </p>
复制代码
请点击评分,对我5分评价,谢谢!

葡萄城控件服务团队
官方网站: https://www.grapecity.com.cn/developer
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部