zoukankan      html  css  js  c++  java
  • How to dynamically control the dimensions displayed on the report?

    Sometimes,we need to print a report how to  the dynamic control of the print dimensions display filed . Standards function the AX system, has been the standard way to achieve this demand, we need to do is small modifications.

    01)Create a report. and set second datasource properties

    Just as in the Form, you must add a InventDim(Table) as the report dataSource. And the properties of the dataSource  such as below:

    Firstonly   : Yes

    FirstFast   : Yes

    FetchMode: 1:1

    JoinMode  : InnerJoin

    Relations  : Yes

    02)as in the Form, as required under the Design Add "InventoryDimensions" field group, in our case, the group is added under the Body

    InventLocationId,ConfigId... ...

    03)OverWritten below method in the report.

    The following methods must be rewritten: classDeclaration, run, dialog, getFromDialog.

    Sure,Pack and unpack can also override the method, not to rewrite dynamic control of their dimensions, but to save the use of data that to Report a memory function.

    public class ReportRun extends ObjectRun
    {
    InventDimParm inventDimParm;
    DialogRunbase dialog;
    DialogGroup dialogInventoryDimensions;

    #define.CurrentVersion(1)
    #localmacro.CurrentList
    inventDimParm
    #endmacro
    }

    void updateDesign()
    {
    ;
    InventDimCtrl::updateReportVisible(element, inventDimParm);
    }

    public void run()
    {
    ;
    this.updateDesign();
    super();
    }

    public Object dialog(Object _dialog)
    {
    ;
    dialog = _dialog;
    dialogInventoryDimensions = inventDimParm.addFieldsToDialog(dialog,"@SYS53654",true, false, "@SYS102592");
    return dialog;
    }

    public boolean getFromDialog()
    {
    ;
    inventDimParm.getFromDialog(dialog, dialogInventoryDimensions);
    return true;
    }

    public container pack()
    {
    return [#CurrentVersion, #CurrentList];
    }

    public boolean unpack(container packedClass)
    {
    Version version = RunBase::getVersion(packedClass);
    ;
    switch(version)
    {
    case #CurrentVersion:
    [version,#CurrentList] = packedClass;
    break;
    default:
    return false;
    }
    return true;
    }
  • 相关阅读:
    VC 读取服务器上的文件(HTTP方式) [转]
    ActiveX控件打包成Cab置于网页中自动下载安装 [转]
    C# 使用xenocode混淆加密【转】
    jenkins插件安装失败更改插件源
    jenkins调用shell脚本 输出带颜色字体
    Centos7 搭建最新 Nexus3 Maven 私服
    jenkins构建java项目找不到命令mvn,java的解决方法
    如何在 Linux 中找到你的 公网IP 地址
    CentOS 7安装Zabbix 3.4
    Linux常见服务器——DHCP服务器的搭建
  • 原文地址:https://www.cnblogs.com/Fandyx/p/2047855.html
Copyright © 2011-2022 走看看