zoukankan      html  css  js  c++  java
  • 用X++动态创建(生成)报表完整Job演示

    static void DynamicsReportX(Args _args)

    {
        #AOT
        str reportName = 'tmp_DynamicxReport_'+curUserID();
        tableid custTableId = tablenum(CustTable);
        TreeNode reportNode = TreeNode::findNode(#ReportsPath);
        Report areport;
        ReportDesign design;
        ReportAutoDesignSpecs specs;
        ReportSection section;
        ReportRun run;
        ;
        // 若存在则先删除,为了避免多用户冲突,报表名后加用户ID
        areport = reportNode.AOTfindChild(reportName);
        if (areport)
            areport.AOTdelete();
        areport = reportNode.AOTadd(reportName);
        areport.query().addDataSource(custTableId);
        design = areport.addDesign('Design');
        specs = design.autoDesignSpecs();
        section = specs.addSection(ReportBlockType::Body, custTableId);
        section.addControl(custTableId, fieldnum(CustTable, AccountNum));
        section.addControl(custTableId, fieldnum(CustTable, Name));
        section.addControl(custTableId, fieldnum(CustTable, phone));
        areport.interactive(false);
        areport.query().interactive(false);
        areport.AOTcompile();
        run = ClassFactory.reportRunClass(new Args(reportName));
        run.init();
        run.run();
    }

  • 相关阅读:
    MySQL_基础_TCL事务控制语言
    MySQL_基础_DDL数据定义语言
    MySQL_基础_DQL数据查询语言
    MySQL_基础_DML数据操纵语言
    MySQL_基础_存储过程和函数
    MySQL_基础_变量
    linux 常用命令
    灵活QinQ示例
    RRPP 演示实例
    ERPS实例演示
  • 原文地址:https://www.cnblogs.com/KobeZhang/p/4858432.html
Copyright © 2011-2022 走看看