problem with columns and subreport (1 Viewer)

senseidan

Registered User.
Local time
Today, 17:15
Joined
Jan 25, 2018
Messages
38
I have set a report to print across then down some columns whose content come from a subreport. When the number of rows in subreport is under 30 (which is the maximum allowed by the size of the paper), the columns are printing as expected but, when is upper, the column "jump" to the next page and print 30 rows then "jump" again to the next page and print the remaining rows (if were 38, it print the remaining 8). After that, if there are more columns with less than 30 rows, they are printing normally. I think something is forcing a page break when the total height of rows of my subreport is larger then subreport container height but I don't know if that is the real reason and, worse, I don't know how to fix this. Can anyone help me?
 

isladogs

MVP / VIP
Local time
Today, 17:15
Joined
Jan 14, 2017
Messages
18,209
Check your report properties for the detail section.
Look at the last three items in the format tab: Keep together, force new page and particularly new row or col. That last one has four options - none, before section, after section, before and after section. Adapt as needed
 

senseidan

Registered User.
Local time
Today, 17:15
Joined
Jan 25, 2018
Messages
38
Well, I have done that and, after reading your reply, I've done it again in every possible combination. The initial setup was KeepTogether:Yes, ForceNewPage:None, NewRowOrColumn:None. This is giving me the result which I've described. If I change NewRowOrColumn or/and ForceNewPage to Before/After/Before&After Section, every column begin in new page. If I also change KeepTogether, after a "more then 30 rows" column, the "title" of the next column is moving at the end of precedent column. So, more mess. Now I'm trying to count the rows then, in VBA, to "tell" the column to break after 30. I know how to count :), but I don't know how to break column.:banghead:
Is this even possible?
 

isladogs

MVP / VIP
Local time
Today, 17:15
Joined
Jan 14, 2017
Messages
18,209
Suggest you post a stripped down copy of your db with the report & anything needed to make it work.
Remove any confidential data but make sure you leave enough records to see the issue & fix it
 

senseidan

Registered User.
Local time
Today, 17:15
Joined
Jan 25, 2018
Messages
38
I've removed confidential data and attached the module in question. If you choose first category from list (which is "c") and then date(1)=14.06.2018 and date(2)=now, it will be evident that 14.06 is ok (8 rows), then report jumps to next page because 15.06 has 40 rows.
 
Last edited:

isladogs

MVP / VIP
Local time
Today, 17:15
Joined
Jan 14, 2017
Messages
18,209
Sorted. I've made two changes

1. The order is now down then across. It works on my tests.
2. You were getting duplicate results e.g id 31 on 14/06. I've changed the query to unique values

Also, not sure you need a report and subreport. Why not make your subreport into the report itself with 5 columns in the detail section. I've not tested this however.
 

Attachments

  • Database1 UPDATED.accdb
    540 KB · Views: 112
Last edited:

senseidan

Registered User.
Local time
Today, 17:15
Joined
Jan 25, 2018
Messages
38
Wow! I was reading this: https://msdn.microsoft.com/en-us/library/office/aa172943(v=office.11).aspx and I was beginning to think that maybe I must try Down then Across and, in that very moment, came your answer. So quick and so... correct. Thank you very much. I am not used to ask for help, in fact I've done it just once - with no result, so, now, I feel somehow in debt. Can I do something in return, other then pressing the Thank You button?
 

isladogs

MVP / VIP
Local time
Today, 17:15
Joined
Jan 14, 2017
Messages
18,209
Well, you could go to my website and purchase site licenses for all my applications....:D

But more reasonably, and only if you wish to do so, please add to my reputation points. To do so, click the scales button, tick I approve and leave me a nice comment. Thanks in advance
 

isladogs

MVP / VIP
Local time
Today, 17:15
Joined
Jan 14, 2017
Messages
18,209
Thank you for the rep comment.
Unfortunately no rep. points added as you only have 12 posts.
 

senseidan

Registered User.
Local time
Today, 17:15
Joined
Jan 25, 2018
Messages
38
I've added to your reputation but nothing changed on the number of green bubbles. Can I add more?
P.S. I've sent an email to you.
 

isladogs

MVP / VIP
Local time
Today, 17:15
Joined
Jan 14, 2017
Messages
18,209
I've added to your reputation but nothing changed on the number of green bubbles. Can I add more?
P.S. I've sent an email to you.

When you have more posts, you will be able to add RPs

The green blobs are added for every 100 points added (up to 500 then every 200 points after that) so it's unusual to see any effect but the recipient is still aware it has been done.

Forum rules mean you can't keep giving RPs to the same person. This is to prevent potential abuse. For more info on the RP feature, see https://www.access-programmers.co.uk/forums/showthread.php?t=284571&highlight=Reputation+points

You might also find part of this thread interesting https://www.access-programmers.co.uk/forums/showthread.php?t=296747

I've made the change you requested in your email
 

Users who are viewing this thread

Top Bottom