如何在报告中将所有文本框的高度设置为相同大小? - Crystal 报告

How to set height of all textboxes be equal size in an report? - Crystal Reports

我正在处理使用 Crystal 报告创建的现有报告。

在此报告中,添加了一个新列,但是,column/row 的值超过了报告的默认设计。

NOTE: The following example is in the "Details section" of the report and is equivalent of the rows of a table.

示例:

 ____________________________ 
| Name      | Worker type    |  // (Worker type) is the new column
|___________|________________|
|  Item 1   | Text 1         |  // Row 1
|  Item 2   | Text 2         | 
|___________| Text 3         |    
|  Item 3   | Text 4         |  
|  Item 4   |________________|
|___________| Text 2         |  // Row 2 - might be bigger "height" than "Name" column.
|  Item 5   | Text 1         |
|  Item 6   | Text 2         |
|___________|________________| 

期望的渲染结果是:

 ____________________________   
| Name      | Worker type    |  // (Worker type) is the new column
|___________|________________|
|  Item 1   | Text 1         |  // Row 1
|  Item 2   | Text 2 Text 3  | 
|___________|________________|    
|  Item 3   | Text 4         |  // Row 2  
|  Item 4   |                |
|───────────|────────────────|
|  Item 5   | Text 2         |  // Row 3 - all rows / columns has appropiate design size.
|  Item 5   | Text 1         |
|  Item 6   | Text 2         |
|___________|________________| 

我试过:

  1. 删除框对象:原始报告使用它们在 "details section" 上设置黑色边框 - 导致上面的示例。
  2. 通过删除框对象,我直接设置了数据字段或文本框的边框。这导致边框线没有 increase/expand 到下一行。

所做修改的示例 - 在第 2 点中描述 - 不一致的设计:

 ____________________________ 
| Name      | Worker type    |  // (Worker type) is the new column
|___________|________________|
|  Item 1   | Text 1         |  // Row 1
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|  Item 2   | Text 2         |  // Row 2
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ 
|  Text 3   | Text 3         |  // Row 3  
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯           
|  Item 4   |                |
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|  Item 5   | Text 1         |
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|  Item 6   | Text 2         |
|___________|________________| 
  1. 对每个数据字段使用 "Can Grow" 选项 - 没有结果将其他列的大小调整为与 "Worker type" 新列相同。
  2. 在 Internet 和此处的 Stack Overflow 中搜索:目前没有结果。

我不知道如何为报告中的所有 datafields/textboxes 设置相同的大小。

有没有办法在 Crystal 报告中将所有文件设置为相同大小?

在 Google 和 Stack Overflow 中进行更深入的搜索后(老实说,在周末休息后 ),我找到了解决方案:

在此answer中说:

Do not use borders of text box to make cell borders, instead use lines to create borders one horizontal line above the text boxes and one below the text boxes. both lines having width long as the detail section. and for vertical borders use vertical lines. that starts from top of group header section and ends at bottom of detail section. now when the height of cell increases when the content is large then all the rows will be set accordingly.

记住这一点,我必须使用 "Line Object" 并绘制分隔行的线条,然后,通过选择绘制的线条并按“格式化多个对象",我marked/checked这两个选项就行了--格式编辑器window:

  • 打印时扩展到部分底部
  • 在水平页面上重复

我认为第一个是制作 "magic" 的人 - 即延长线,但是,为了确定,第二个选项也应该被标记。

经过这些修改后,我确实得到了想要的结果:

 ____________________________   
| Name      | Worker type    |  // (Worker type) is the new column
|___________|________________|
|  Item 1   | Text 1         |  // Row 1
|  Item 2   | Text 2 Text 3  | 
|___________|________________|    
|  Item 3   | Text 4         |  // Row 2  
|  Item 4   |                |
|───────────|────────────────|
|  Item 5   | Text 2         |  // Row 3 - now all rows / columns has appropiate design size.
|  Item 5   | Text 1         |
|  Item 6   | Text 2         |
|___________|________________|