wdtlcv 发表于 2017-4-18 18:37:00

ActiveReport 在Page页上画图的问题

本帖最后由 wdtlcv 于 2017-4-18 18:38 编辑

版主:
       我用的的ActiveReport9,Windowform开发
       我的需求是想通过Document.pages的Drawline和DrawText方法在报表上画线和文字
       我按照帮助文档提供的方法做了一个例子,但是无法在报表预览的时候,并没有画出线和文字来,我想知道如果使用这个功能,需要什么特殊的设定吗

我的例子代码是这么写的
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
      Dim rpt As New SectionReport1
      rpt.Run()
      Viewer1.Document = rpt.Document
      With Viewer1.Document.Pages(0)
            .BackColor = System.Drawing.Color.Black
            .ForeColor = System.Drawing.Color.YellowGreen
            .PenStyle = GrapeCity.ActiveReports.Document.Section.PenStyles.Solid
            .PenWidth = 10
            .DrawLine(15, 1, 10, 10)
            .DrawText("hellow world", 50, 50, 10, 10)
      End With

      Viewer1.Refresh()
    End Sub

基本上是照搬的帮助文件中给的例子,但是不好使
我使用的VS是VS 2015 ,framework版本是4.6


wdtlcv 发表于 2017-4-18 18:49:55

找到原因了,单位设置错了,现在OK了

Lenka.Guo 发表于 2017-4-19 11:07:58

好的,谢谢反馈~
页: [1]
查看完整版本: ActiveReport 在Page页上画图的问题