grouping or sorting issue (page keeps repeating)

freightguy

Registered User.
Local time
Yesterday, 20:11
Joined
Mar 1, 2016
Messages
36
Good evening
I have an issue with a report I am close to completing. Based on user input, the report spits out list of dangerous goods along with relative regulatory information. Everything works fine with exception of the following:

The form is grouped by fields "productUN" and "productClass". (when I figure this out, I will have a third group/sort). The problem starts when there are more than four groups. The fifth group does not print and the report prints FIVE times. (see attached pdf file sample). (also attached is a query list of items that shows/proves there should be 5 groups)

I suspect I'm doing something wrong in the grouping/sorting area but can't figure this one out.

Any help would much appreciated.
 

Attachments

Check the recordsource for the main report.
I suppose it has five records, it should only have one, (the sub report is printed as many times as the main report has records).
Also check the recordsource for the sub report, if the the data is correct.
If you can't find the problem, then post your database with some sample data + a description on how to reproduce your problem.
 
thanks JHB - working on it and let you know what I come up with.
Cheers!
 
HI JHB - see attached zipped db. Select "frmExportShipment" and it will default to first and only record. Click on the magnifying glass down in the menu selection to view form. It will ask for name and title. In this case form should return 5 records and print on two pages because first page only has room for 4 items. But the form only prints 4 records and repeats the form print 5 times.

thanks again
 

Attachments

My response here will not bringing any news into it, only clarify what I wrote in post #2.
The recordsource for the main report returns 4 records, (see the below picture), so the report is printed 4 times, (printed as many as the records). You can limit it to only one record by using the DISTINCT in the select statement.
attachment.php


I also mention you should check the recordsource for the sub report, then it is only returning 4 records, I don't know where you get the fifth from, (see below picture)!
attachment.php


So all in all, either you didn't understand what I wrote in post #2, or you ignore it. :o
I've attached the database so you can see how the DISTINCT is used.
 

Attachments

  • qryIMOHeader.jpg
    qryIMOHeader.jpg
    25.8 KB · Views: 254
  • qryExportDetail.jpg
    qryExportDetail.jpg
    23.5 KB · Views: 298
  • DGD Oct 15.mdb
    DGD Oct 15.mdb
    1.4 MB · Views: 87

Users who are viewing this thread

Back
Top Bottom