要设置ActiveReports 13中垂直文本间距,可以使用以下代码示例:
// 获取ActiveReports的SectionReport对象
SectionReport report = new SectionReport();
// 获取ActiveReports的Section对象
Section section = report.Sections[0];
// 获取ActiveReports的Text对象
Text text = section.Controls[0] as Text;
// 设置垂直文本间距
text.VerticalSpacing = 10; // 设置为您想要的值
// 更新报表布局
report.Document.LocateControls();
// 渲染报表
report.Run();
这里假设您的报表只有一个Section,第一个控件是Text。您需要根据您的实际情况进行相应的调整。
在上述代码示例中,我们首先获取报表对象和Section对象,然后获取Text对象。接下来,我们将VerticalSpacing属性设置为您想要的垂直间距值(以点为单位)。最后,我们使用LocateControls方法更新报表布局,并使用Run方法渲染报表。
请确保您已正确引用ActiveReports 13的相关命名空间。