zoukankan      html  css  js  c++  java
  • dxSpreadSheet的报表demo-关于设计报表模板问题

    学习 dxSpreadSheetReportDesigner过程中发现:

     dxSpreadSheet通过dxSpreadSheetReportDesigner点击右键出现弹出菜单,自动生成如图的菜单和actions,不用写一句代码。对于懒人来说酷毙了。

    但是Master-Detail和GroupHead以及GroupFooter的section来说,它是从1生成的数据section。导致分组和主从表就会出现错误。看demo代码section都是从0开始的。数据呈现也没有问题,但是用自己的自动生成的action执行,就是乱表格数据。

    处理方法:

    1、找到单元:dxSpreadSheetReportDesignerActions

    2、找到方法:TdxSpreadSheetReportDesignerAction.GetMaxSectionID

    3、修改代码:Result := 0 改成 Resul := -1;

    4、ok了

    function TdxSpreadSheetReportDesignerAction.GetMaxSectionID(
      ASectionType: TdxSpreadSheetReportSectionType): Integer;
    var
      I: Integer;
    begin
      Result := -1;   //0
      for I := 0 to Designer.SectionList.Count - 1 do
        if Designer.SectionList[I].SectionType = ASectionType then
          Result := Max(Result, TdxSpreadSheetReportSectionAccess(Designer.SectionList[I]).Index);
    end;

    版本:18.1.6

    goodluck

    https://www.cnblogs.com/usegear/p/15505219.html

  • 相关阅读:
    关于此博客的制作
    Java线程运行轨迹-代码追踪与定位
    MySQL安装和使用
    jenkins安装和使用教程
    持续集成(git+TortoiseGit+Gitblit)
    RF框架基础知识(二)
    RF工具ride使用
    Postman的使用
    用Python写RF测试
    RF框架基础知识(一)
  • 原文地址:https://www.cnblogs.com/usegear/p/15505219.html
Copyright © 2011-2022 走看看