zoukankan      html  css  js  c++  java
  • 将报表打印到文件

     1 static void Jinn_printter(Args _args)
     2 {
     3     Args             m_args = new Args();
     4     SysReportRun     m_reportRun;
     5     printJobSettings m_printJobSettings = new printJobSettings();
     6     
     7     boolean          isCorrect = true;
     8     ;
     9     try
    10     {
    11         if (winAPI::fileExists("c:\\wo_mstr.pdf"))
    12         {
    13             winAPI::deleteFile("c:\\wo_mstr.pdf");
    14         }
    15         
    16         m_printJobSettings.setTarget(PrintMedium::File);
    17         //printJobSettings.preferredTarget(PrintMedium::File);
    18         m_printJobSettings.format(PrintFormat::PDF);
    19         //printJobSettings.preferredFileFormat(PrintFormat::PDF);
    20         m_printJobSettings.fileName("c:\\wo_mstr.pdf");
    21 
    22         m_args.name(reportstr(wo_mstr));
    23         m_reportRun = classfactory.reportRunClass(m_args);
    24         m_reportRun.query().interactive(false);
    25         m_reportRun.report().interactive(false);
    26 
    27         m_reportRun.printJobSettings(m_printJobSettings.packPrintJobSettings());
    28 
    29         m_reportRun.run();
    30     }
    31     catch (exception::Error)
    32     {
    33         isCorrect = false;
    34     }
    35     
    36     if (!isCorrect)
    37     {
    38         info("some errors have been occured");
    39     }
    40 }
  • 相关阅读:
    持续集成概念
    性能测试,负载测试,压力测试有什么区别
    安全测试
    接口测试及常用接口测试工具
    python-Csv 实战
    Python3 + Appium学习链接
    python-Txt实践
    python-ddt实践
    保险--总结
    selenium与页面的交互
  • 原文地址:https://www.cnblogs.com/Jinnchu/p/2663942.html
Copyright © 2011-2022 走看看