Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

First pagecontains first data set, but layout is different 1

Status
Not open for further replies.

Rainer2000

IS-IT--Management
Apr 27, 2003
61
DE
The german customs declaration form has a first page which differs from the rest of the pages. Unfortunately it also contains the first record set.

So what I am aiming at is: The first record should be on page one, which has a different layout than pages 2+. The remaining record sets should be on pages 2+.

This is what I am at: I placed the data into the detail Section and so I correctly get pages 2+ with their header.

To get a different first page I also placed a record set into the page header. Now I am getting a different first page, but- no wonder- I am getting the first record twice.

Does anybody have an idea???

Thanks for your efford.

Rainer
 
Try putting the first page info into the REPORT header.

And to get rid of displaying the first record twice, i guess you could use some VBA on the forms Detail On Format event to check if it is the first record, and if so you can cancel the format, otherwise allow it.

-Pete
 
Hi Pete,
thanks for your answer. Now I need to get rid of the double record. This seems to be quite difficult, because I need to leave the first record on page1 and start the next page with record2..3..4 etc, this means "deleting" record 1 on page 2 and moving the other records up one step.

There must be a better way to deal with this whole issue except that I do not see one, nor do the books I have asked.

Rainer
 
Im not sure how your data is, so this is something that ive come up with. you can place the following code into the VBA of your report

Code:
Private rCount As Integer

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    rCount = rCount + 1
    If rCount = 1 Then Cancel = True
End Sub

Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
    rCount = 0
End Sub

we set rcount to zero on the report footer so that the count is correct for the format. it will count the records as it comes to them, and cancel the format of the details section if it is on the first record.

-Pete
 
Hi Pete,

thanks for your efford. I think it works. Due to the time difference to Europe I will resume tomorrow, but I think it works!!

Rainer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top