Help on limit no of records in report

Yes I removed now the report is working but it didn't divide the pages
I tested it, I've selected 9 employees :
it gives 8 in the first page and 1 in the second page

I'm here with you
 
You are doing something wrong because it works on mine. Make sure the DCount() is correct and make sure it is in the right event, OPEN event.

Ensure that you have [Page] " of " [Pages] in the Page Footer section of your report.
 
Yes friend

I did, but it still
can I attach the db for you ??
 
Not yet.

Let me see what you put in the DCount()

Also, let me see the Record Source of your report.
 
In the DCount() I put the Query name (CurrentProc)
The Record Source of the report is a Query (CurrentProc)
 
hey friend

I figured out something :
The report as I told you before is grouped by the Procedure Type
** when I select 18 it gives the perfect solution just for the last procedure type but the first still the same.
** Another note : the page footer doesn't appear in the last page.

waiting for you
 
If there's grouping in place then it probably won't work.
 
so what's your idea ???
I can remove the grouping, but what about page footer it doesn't appear in the last page.
 
You can attach your db now. Keep the grouping on and I'll have a look and see what can be done.
 
Maybe this one will do it for you. See attached.

NB: You put the page count in the report footer. It's a page count and should be in page footer. Plus, the reason why you couldn't see the page footer on the last page is because the height of your sections were too tall.
 

Attachments

Hello friend

How are you ,,, so happy to see you again
I've downloaded the file, it's working very well ,, incredible ,,, BUT when I took it to my db :

1- It didn't work as your file, I mean that it didn't divide as it should divide

2- I've error in the code :
Code:
Private Sub GroupHeader0_Print(Cancel As Integer, PrintCount As Integer)
Case Else
                pgNumbers(pgNum) = 8
                intCountAll = intCountAll - 8
                pgNum = pgNum + 1

The line is pgNumbers(pgNum) = 8

Waiting you Master
 
Hello again

I tried too much with the report but without any positives, I think that I've done all what you said.
The code seem doesn't exist :confused: !!! when I put the code no effect occurs then removed it and give me the same result : it didn't divide :(.

Any way I know that I was like a heavy load, and cause some headache for you, I apologize for that.
But honestly your code is amazing, really incredible, I hope I could use it. I thank you very much for your time and ideas, you are a real Master.

Thank you
 
I will advise that you follow every single thing that was done on the database I attached. If you miss a little detail it just won't work. In any case, here are some questions:

Are you saying that it doesn't split the records AT ALL? Or it does it but not correctly?

How did you fix the pgNumbers(pgNum) = 8 problem?

Do you have any other grouping in the report?
 
1- Yes no splitting
2- I didn't fix the pgNumbers(pgNum) = 8 problem, I closed the report and opened it again!!! done by itself.
3- I have no other Groups
 
Put a msgbox in that Group Header section, just after the variable declarations to see if it fires.

Also, did you create a report to count how many records per group and join it to the query?
 

Users who are viewing this thread

Back
Top Bottom