Solved Print preview does not match printed page (1 Viewer)

ClaraBarton

Registered User.
Local time
Yesterday, 16:40
Joined
Oct 14, 2019
Messages
461
I have a report with the page number as openargs if it isn't the complete report. Print preview has the correct page numbers but when I print the preview, it starts with page 1. Obviously, the preview is not what's printing. How do I fix this?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 18:40
Joined
Feb 28, 2001
Messages
27,179
How do you convey the OpenArgs to that slot that contains page number?

According to the M$ docs, the Report.Page propery IS writeable.


However, if you pick the wrong place to set the number, it might not take effect. In the OnPrint routine for the report section that contains the page number slot, you should be able to assert the number. Or did you mean that the report is printing correctly but starting at the wrong page because you DIDN'T want to see the first actual page of the report?
 

ClaraBarton

Registered User.
Local time
Yesterday, 16:40
Joined
Oct 14, 2019
Messages
461
I mean that I only wanted to print the last page with new additions. I used OpenArgs in the DoCmd.OpenReport and then
Code:
  If IsNull(Me.OpenArgs) Then
        Me.Page = 1
    Else: Me.Page = Me.OpenArgs
    End If
When I print preview, the page no is 107, when I print it's 1.
 

ClaraBarton

Registered User.
Local time
Yesterday, 16:40
Joined
Oct 14, 2019
Messages
461
That's in Report Load. Perhaps it should be in On Print?
 

Users who are viewing this thread

Top Bottom