1

我有一个相当复杂的多页报告,其中包含嵌套表中的流。该报告现在使用的内容比最初计划的要长得多。该报告使用 3 个嵌套表很好地重排,但是当我添加第四个时,它不再重排并使用以下响应使脚本崩溃:

Flowable <Table@0x7FC7D4566200 1 rows x 3 cols(tallest row 1367)> with cell(0,1) containing '<Table@0x7FC7D4563638 3 rows x 4 cols(tallest row 1257)> with cell(0,1) containing\n\'<Table@0x7FC7D4556488 1 rows x 2 cols(tallest row 88)> with cell(0,0) containing\\n"<Table@0x7FC7D4561FC8 4 rows x 2 cols(tallest row 32)> with cell(0,0) containing\\\\n\\\'<Paragraph at 0x7fc7d45603f8>Classification\\\'"\''(612.0 x 1367), tallest cell 1367.0 points, too large on page 5 in frame 'normal'(600.0 x 664.0*) of template 'normal'

我目前的解决方案是执行以下步骤:

  1. 在我放置内容之前确定页面位置
  2. 获取内容的长度
  3. 计算预期剩余房间
  4. 计算内容所需的空间
  5. 如果内容合适,请将其添加到页面,否则:
    • 将内容分成 2 个块(但这可能会导致 xml 问题):块 A 和块 B。
    • 将 chunkA 添加到页面
    • 关闭表
    • 开始新表
    • 从上面的步骤 1 处理块 B。

显然,这个过程充满了问题。有没有人有更好的解决方案?

4

0 回答 0