【问题标题】:How to draw line programmatically for controls in detail section in crystal report?如何以编程方式为水晶报表中详细部分的控件画线?
【发布时间】:2021-10-18 11:19:44
【问题描述】:

我想根据 3 个控件中的数据量,在不将这些控件合并在一起的情况下,以编程方式为水晶报表中详细信息部分中的控件画线,我有一个可以访问的工作代码,它运行良好,我想在水晶报告中使用相同的代码,但我不知道将代码放在哪里以及如何处理类似的代码 每个控件的详细信息.controls
我在 Access 中的代码是

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim MaxHt As Single
Dim ctl As Control
    MaxHt = Me.Remarks.Height + Me.RemUpdate.Height + Me.Client.Height
 'Get maximum height of any control
        For Each ctl In Me.Section(acDetail).Controls
    If ctl.Height > MaxHt Then
      MaxHt = ctl.Height
    End If
  Next
  'Use maximum height to draw rectangles around each control
    For Each ctl In Me.Section(acDetail).Controls
    Me.Line (ctl.Left, ctl.Top)-(ctl.Left + ctl.Width, MaxHt), vbBlack, B
  Next
End Sub        

1- 我在 Crystal Report 中找不到 Detail_Print 事件 - 我在 Load 事件中使用(我不知道这是否正确) 2- 我不知道如何在水晶报告的详细信息部分中引用控件,如 Access 例如 me.Remarks 指的是 Access Report 中的 Remarks Control in Detail 部分 3-我不知道如何控制水晶报表字段的高度或宽度

我在网上查了很多次,都没有找到确切的答案 所以我需要你的帮助

谢谢,问候

【问题讨论】:

    标签: vb.net crystal-reports report


    【解决方案1】:

    你不应该那样做。如果您在报告部分中绘制线条或框,则格式选项之一是“打印时扩展到部分底部”。

    【讨论】:

    • 感谢您的回复
    猜你喜欢
    • 2020-10-19
    • 1970-01-01
    • 2013-11-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多