简体   繁体   English

在水晶报表中,如何使文本对象向上而不是向下生长?

[英]In Crystal Reports, how to make a textobject grow upwards instead of downwards?

Is there some way to format a textobject to stick to the bottom of one section and then, depending on how much text that is filling it, make it grow upwards?是否有某种方法可以将文本对象格式化为粘在一个部分的底部,然后根据填充它的文本数量,使其向上增长? Much like the behavior that we associate with vertical alignment.很像我们与垂直对齐相关的行为。 As far as I know, vertical-alignment:bottom (or similar) does not exist in Crystal Reports.据我所知,水晶报表中不存在vertical-alignment:bottom(或类似的)。

Is there a way to accomplish this by code, formatting formulas or some other way?有没有办法通过代码、格式化公式或其他方式来实现这一点?

You should be able to achieve the same effect by你应该能够达到同样的效果

  • splitting the existing section into two subsections将现有部分分成两个小部分
  • placing the growable field as the only field in the first subsection, and all other fields in the second subsection将可种植字段作为第一小节中的唯一字段,并将所有其他字段置于第二小节中
  • in the section expert, checking the "Underlay Following Sections" option for the first subsection.在部分专家中,选中第一个小节的“底层以下部分”选项。

Put the field on the report twice.将该字段放在报告上两次。 Suppress one if it's short, supress the other if it's long.如果它很短,则抑制一个,如果它很长,则抑制另一个。

I just found workaround to this add carriage return chr(13) before text depends on text length我刚刚找到解决方法,在文本取决于文本长度之前添加回车符 chr(13)

If Len < 25
Chr(13) + Chr(13) + Text
else if Len < 50
char(13) + Text 
....

and so on等等

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM