Printer draw event, multiple pages
Posted
#1
(In Topic #2015)
Regular

Everything is fine untill more than one page of data is generated.
Some guidance as to how to do this would be much appreciated
Posted
Regular

Here is some code to demonstrate:-
Paint.Begin(MyPrinter)
Paint.Font = Font["Sans, 20, Bold"]
Paint.DrawText("Content for Page " & (MyPrinter.Page), 100, 200)
For i = 0 To 100
Paint.DrawText("Line " & i, 150, 250 + (i * 300))
Next
Paint.Font = Font["Sans, 10"]
Dim sFooter As String = "Page " & (MyPrinter.Page) & " of " & MyPrinter.Count
Paint.DrawText(sFooter, 100, Paint.Height - 100)
Paint.End()
This prints values of i= 0 to about i =30 for each page.
How can the for…next loop be interupted to start a new page?
Posted
Enthusiast

Right click on Fmain… New… Report
and lay out your page in the report form there are examples of reprots in the farm.
Reportexample is one of them there are others.
If you don't want to use the report … then you have to keep track of the number of lines and generate a new page yourself … you put one page in a sub and call it with the data .
Last edit: by GrayGhost
Posted
Regular

I'll try both but Report2 first!
1 guest and 0 members have just viewed this.





