Question

I am working on a legacy VB6 application that uses ActiveReports 2. I am experimenting with drawing lines on the page. When I have a report where the data causes the generated report to have more than one page, I noticed that the DrawLine method only draws the line on the last page.

For example, in the ReportEnd event handler of the ActiveReport, I have the following code:

Me.Pages(0).DrawLine 2000, 2000, 2000, 5000
Me.Pages(1).DrawLine 2000, 2000, 2000, 5000

When I have a two page report, the line only appears on page 2. Does anybody know why? What am I doing wrong?

Was it helpful?

Solution

I figured out that I should use the PageEnd event handler instead with the following code:

Me.Canvas.DrawLine 2000, 2000, 2000, 5000

This will draw a line on each page after it is rendered.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top