zoukankan      html  css  js  c++  java
  • Using to X++ code create and running report

    X++ Code below as:

    Wrote by Jimmy on DEC.3th 2010

    Usinmg X++ Code Created report
    static void Jimmy_ReportCodeCreatedRun(Args _args)
    {
    #AOT
    Report areport;
    ReportDesign design;
    ReportAutoDesignSpecs specs;
    ReportSection section;
    ReportRun ReportRun;
    str reportName
    = "CodeAutoCreatReport";
    tableid custTableId
    = tablenum(CustTable);
    TreeNode reportNode
    = TreeNode::findNode(#ReportsPath);
    ;
    // Delete the report if it already exists
    areport = reportNode.AOTfindChild(reportName);
    if (areport)
    areport.AOTdelete();

    // Build the report
    areport = reportNode.AOTadd(reportName);
    //Add datasource for report
    areport.query().addDataSource(custTableId);

    //set up Design
    design = areport.addDesign('Design');
    design.reportTemplate(
    "InternalList");
    design.caption(tableid2PName(tablenum(CustTable)));

    specs
    = design.autoDesignSpecs();
    section
    = specs.addSection(ReportBlockType::Body, custTableId);
    section.addControl(custTableId, fieldnum(CustTable, AccountNum));
    section.addControl(custTableId, fieldnum(CustTable, Name));

    // Now the report will not prompt for user input
    areport.interactive(false);
    areport.query().interactive(
    false);
    areport.AOTcompile();

    ReportRun
    = ClassFactory.reportRunClass(new Args(reportName));

    ReportRun.init();
    ReportRun.printJobSettings().suppressScalingMessage(
    true);//removed Scaling Message
    ReportRun.run();
    }
  • 相关阅读:
    717. 1比特与2比特字符
    697. 数组的度
    674. 最长连续递增序列
    665. 非递减数列
    661. 图片平滑器
    643. 子数组最大平均数 I
    plink计算两个SNP位点的连锁不平衡值(LD)
    GWAS群体分层校正,该选用多少个PCA
    PyCharm的安装和应用
    GWAS后续分析:多基因风险评分(Polygenic Risk Score)的计算
  • 原文地址:https://www.cnblogs.com/Fandyx/p/1895694.html
Copyright © 2011-2022 走看看