For set dynamic height for controls in report

on executeSection method:

method 01

  1. real maxHeight;
  2. str maxStrValue = this.maxStrControlName();
  3. ReportStringControl maxStrControl = element.design().controlName("maxStrControlName");
  4. ;
  5. maxHeight= maxStrControl.heightOfWordWrappedString100mm(maxStrValue);
  6.  
  7. if (maxHeight!= maxStrControl.height100mm())
  8. {
  9. maxStrControl.height100mm(maxHeight);
  10. }

or same in char:

method 02

  1. int maxHeightChar;
  2. ;
  3.  
  4. maxHeightChar = maxStrControl.widthOfString100mm(maxStrValue) / maxStrControl.width100mm() + 1;
  5.  
  6. maxStrControl.height(maxHeightChar , Units::CHAR);

for example

  1. public void executeSection()
  2. {
  3. //CUS Changed on 09 Oct 2013 at 12:28:55 by Jimmy Xie TECTURA LL000260 Begin
  4. ReportStringControl maxStrControl = element.design().controlName("commodityNo");
  5. str maxStrValue = this.commodityNo();
  6. int maxHeight = maxStrControl.widthOfString100mm(maxStrValue) / maxStrControl.width100mm() + 2;
  7. ;
  8. /* method 1
  9. maxHeight = maxStrControl.heightOfWordWrappedString100mm(maxStrValue);
  10. if (maxHeight != maxStrControl.height100mm())
  11. maxStrControl.height100mm(maxHeight);
  12. */
  13.  
  14. //commodityNo.height(maxHeight, Units::char);
  15. // method 2
  16. LineNumStr.height(maxHeight, Units::char);
  17. ItemName.height(maxHeight, Units::char);
  18. QtyStr.height(maxHeight, Units::char);
  19. SalesPriceStr.height(maxHeight, Units::char);
  20. netSalesPriceStr.height(maxHeight, Units::char);
  21. amountStr.height(maxHeight, Units::char);
  22. //CUS Changed on 09 Oct 2013 at 12:28:55 by Jimmy Xie TECTURA LL000260 End
  23.  
  24. serialNumber++;
  25. super();
  26. totalTaxValue += CustInvoiceTrans.lineAmountInclTax();//TaxAmount;
  27. totalQty += CustInvoiceTrans.Qty;
  28. }

How to resolve DynamicHeight problem in Morphx report[X++]的更多相关文章

  1. How to resolve mysql problem when you get code 2003(10061) and 1130

    When I use Navicate to connect to mysql on Ubuntu, I got message 2003(10061) firstly. To resovle thi ...

  2. Autel MaxiSys Elite Diagnostic Tool Common problem solving methods

    1. updating MaxiFlash Elite to firmware 3.21? My maxisys communicate with the MaxiFlash J2534 but Ma ...

  3. Spring security 3.1 +JSF 2.0 . problem with annotating methods in ManagedBeans?

    Hy .What i am trying to do is to integrate Spring security with a Jsf+spring IOC +hibernate applicat ...

  4. How do I resolve the CodeSign error: CSSMERR_TP_NOT_TRUSTED?

    How do I resolve the CodeSign error: CSSMERR_TP_NOT_TRUSTED? The Xcode build error titled "CSSM ...

  5. Resolve Error While Windows 10 Updating Cross Multiple Updating Versions (Such as Error 0x800f0831 when Update KB4556799) | 解决跨多个更新版本升级Windows 10时遭遇错误的问题(如 KB4556799 / 错误0x800f0831)

    Upgrade memory size for a laptop recently, the OS on the laptop was Windows 10 with a version of 201 ...

  6. Circuit Breaker Pattern(断路器模式)

    Handle faults that may take a variable amount of time to rectify when connecting to a remote service ...

  7. 2016-07-07: 重新编译时vc90.pdb不是创建此预编译头时使用的pdb文件

    使用VS2008在一个解决方案中包含多个项目时,当设置多个项目的中间目录为同一个目录时,在增量编译时出现"重新编译时vc90.pdb不是创建此预编译头时使用的pdb文件,请重新创建预编译头问 ...

  8. (转)The Road to TensorFlow

    Stephen Smith's Blog All things Sage 300… The Road to TensorFlow – Part 7: Finally Some Code leave a ...

  9. Windows SEH学习 x86

    windows 提供的异常处理机制实际上只是一个简单的框架.我们通常所用的异常处理(比如 C++ 的 throw.try.catch)都是编译器在系统提供的异常处理机制上进行加工了的增强版本.这里先抛 ...

随机推荐

  1. 为什么很多国内公司在做 AI 芯片?

    据网上搜到的新闻报道,截止2019年,已经有20家企业投入到 AI 芯片的研发中,其中有很多厂商的芯片已经流片甚至商用了.为何有这么多公司在做AI芯片呢?简单来讲就是四个字:有利可图.具体来说有以下三 ...

  2. 教你两步快速使用华为HMS沙盒(沙箱)测试

    沙盒(沙箱)测试允许在开发者在接入华为应用内支付IAP联调过程中无需真实支付即可完成端到端的测试. 第一步:添加测试账号 在AppGallery Connect中的"用户与访问"添 ...

  3. Tomcat配置Gizp 客户端使用okHttp3

    找到tomcat 在 server.xml 新增如下配置 <Connector connectionTimeout="20000" port="8088" ...

  4. docker overlay原理

    周末两天研究了一下docker overlay网络的原理,因为我本身对go语言不太熟悉,直接看docker官方的libnetwork库看不太懂,看linux内核的vxlan代码又粗心大意,导致有一个环 ...

  5. 多测师讲解自动化_rf框架搭建_高级讲师肖sir

    robot framework:自动化测试框架(简称RF框架) Python3.7 RIDE(可视化界面).  Wxpython  pip(在线下载) . setuptools(在线安装) . 第三方 ...

  6. CSS常见反爬技术

    目录 利用字体 反爬原理 应对措施 难点: 利用背景 反爬原理 应对措施 利用伪类 反爬原理 应对措施 利用元素定位 反爬原理 应对措施 利用字符切割 反爬原理 应对措施 利用字体 反爬原理 反爬原理 ...

  7. 多层级makefile

    多层级makefile 当项目变大之后,需要多层级的makefile来编译,每个makefile的具体功能实现参考单源文件目录makefile.然后再在顶层目录写一个总的makefile来实现编译逻辑 ...

  8. 10年经验17张图带你进入gitflow企业项目代码版本管理的最佳实践

    前言 对于项目版本管理,你是否存在这样的痛点:项目分支多而杂不好管理,git log界面commit信息错乱复杂无规范,版本回退不知道选择什么版本合适--. 项目版本管理的最佳实践系列,笔者将以两篇文 ...

  9. 基于python常用排序与查找

    """ 排序与查找 -- 冒泡排序 -- 选择排序 -- 快速排序 --****经典 -- 希尔排序 """ # 常用排序的实现 # 冒泡排 ...

  10. C语言/C++编译环境的设置!有的人还没开始就卡住了!

    本地环境设置 如果您想要设置 C++ 语言环境,您需要确保电脑上有以下两款可用的软件,文本编辑器和 C++ 编译器. 文本编辑器 这将用于输入您的程序.文本编辑器包括 Windows Notepad. ...