【问题标题】:How to write formula to grow all dynamic text field in crystal report如何编写公式以在水晶报表中增长所有动态文本字段
【发布时间】:2013-09-06 20:45:19
【问题描述】:

各位专家,

有没有办法自动增长动态文本的内容 水晶报表中的字段。我会给你一个这样的例子。

我有值在水晶报表中显示为(我们从数据库中动态获取) Employee_ID、Employee_name、Employee_address

现在,Employee_ID、Employee_name 就可以了。但对于 Employee_address 的值可以是数据库中的任何值,即它 也可以很长(例如也有 80 个字符)。那就是它会在下一行出现 与下面的行列('地址')值重叠。

现在,当一个动态文本字段增长时,有什么方法(或公式) 喜欢地址,然后是前两个 Employee_ID 和 Employee_address 应该自动增长,下一行的数据不应该重叠 也。

请给出想法。

提前致谢。

【问题讨论】:

  • 为什么不直接将所需字段Can Grow? 属性标记为true 并让Crystal Reports 处理工作?
  • 是的,这是可以做到的,但如果我们知道只有一个领域会增长。然后我们为什么使用可以将字段扩展到所有字段。如果报告有 10 个值要显示。这就是为什么我想知道有什么方法可以应用到水晶报告中,如果一个领域增长,其他领域就会按程序增长。

标签: crystal-reports crystal-reports-2008


【解决方案1】:

如果您将三个字段标记为can grow,则每个字段将根据需要(垂直)扩展以容纳数据。如果该字段不需要扩展,则不会。此外,如果三个字段并排排列在同一个details 部分中,则不会有重叠——无论是水平还是垂直。

如果您尝试始终将三个字段底部对齐,考虑到任何字段的垂直大小(您的示例中的地址字段似乎是问题),那么您会遇到不同的问题:

Relative Positions
This option allows you to lock the relative position of a report object next to a grid object within a section. For example, if you place a text object one centimeter to the right of a cross-tab object, during report generation the program will push the text object to the right, so that the one centimeter space is maintained regardless of the width of the cross-tab object.
Note: 
Only horizontal locking is possible. If you need to preserve relative vertical positioning, you should create a new report section.
Once Relative Positions is selected for a section, you can no longer drag objects to new positions within that section. To change an object's position, use the Object Size and Position dialog box.
Relative positioning applies only to objects placed to the right of grid objects (that is, objects that can grow horizontally).

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多