Link to home
Start Free TrialLog in
Avatar of fuerteventura
fuerteventura

asked on

Change Label in Page Header on datareport

My datareport often spills on to 2 pages. What I want is on each page, to have the address. The most logical answer to this is to place the address in the page header, although as I'm sure many of you will know, you cannot have a bound control in the page header. To get round this, I am trying the following:

Private Sub DataReport_Initialize()
        With DataEnvironment1.rsCustomer
                 DataReport1.Sections("Section2").Controls("lblAddress").Caption = .Fields("Address")
        End With
End Sub

This works fine on the first record in the recordset. However, the first address in the recordset is on all pages (i.e Customer1's Address appears at the top of Customer2's report, when I need Customer2's address) when I want the address of the current record. is it possible to do this?
ASKER CERTIFIED SOLUTION
Avatar of Taconvino
Taconvino

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial