Solved Report goes to 4 pages (1 Viewer)

Libre

been around a little
Local time
Today, 01:07
Joined
May 3, 2007
Messages
677
I have the data formatted the way I want. But It goes to 4 pages although all the data is on Page 1 with the following pages repeating all or part of Page 1.
I'm using a List Box to display the lines of an invoice. The header information (Invoice Number, Customer name etc) is from another table.
It looks ok on page one but how can I limit it to just one page especially if there are only 4-5 lines in the detail section?
Thanks in advance.
 
If the List Box displays the lines of your invoice, remove the invoice details from the report record source. I expect the record source would be only the Invoice level.
 
If the List Box displays the lines of your invoice, remove the invoice details from the report record source. I expect the record source would be only the Invoice level.
Excellent! Works perfectly. At first I was confused...remove the line details...eh? But of course because they are covered by the list box source, independent of the report source. And it works so thank you very much. Saved me much anxiety - couldn't find a thing about it by googling.
 
This is a somewhat rare question. Usually the posting person has a subreport for the details rather than a list box which is new to me.
 
This is a somewhat rare question. Usually the posting person has a subreport for the details rather than a list box which is new to me.
I haven't done much with reports. I'm just trying to get the output to be correct and formatted properly. I usually prefer list boxes to sub forms (not sure about sub reports) because they are much tidier with less overhead, take up less space etc, but you can only address one field in a list box directly, so there's that. I did try a subform/subreport but it was only showing 1 line of data.
 
I usually prefer list boxes to sub forms (not sure about sub reports) because they are much tidier with less overhead, take up less space etc, but you can only address one field in a list box directly,
Where did you get that idea?
1731615416840.png
 
Where did you get that idea?
View attachment 117067
I don't know what that graphic demonstrates, but I meant that a list box has only one bound column so when you click or doubleclick on a line in a list box you're only addressing that one column, while with a subform you can click on (directly address) any column so it's more useful in that regard. That's been my experience at any rate. One bound column in a list box - it doesn't have to be the first. Thanks again for the useful answer.
 
It was showing multiple columns, but you are correct, only one field is bound.
However nothing to stop you concatenating the fields with a comma, and then split them by the same. Might not be the best method, but one that exists.
Personally I would use subreports, if 1 to many.
 
I haven't done much with reports. I'm just trying to get the output to be correct and formatted properly. I usually prefer list boxes to sub forms (not sure about sub reports) because they are much tidier with less overhead, take up less space etc, but you can only address one field in a list box directly, so there's that. I did try a subform/subreport but it was only showing 1 line of data.

listboxes and subforms/subreports are not interchangeable. They are used for very different things.

Check the report carefully to make sure that if the details extend to a second page, the listbox paginates correctly. You may need to revert to a dreaded subreport to get the report to print correctly.

You can format subforms/subreports to be as concise as a listbox pretty easily.
 
listboxes and subforms/subreports are not interchangeable. They are used for very different things.

Check the report carefully to make sure that if the details extend to a second page, the listbox paginates correctly. You may need to revert to a dreaded subreport to get the report to print correctly.

You can format subforms/subreports to be as concise as a listbox pretty easily.
"They are used for very different things".
In my use of them, they are similar. In this precise case I'm putting the lines of an invoice into the detail section. These lines show up clearly in a list box, complete with column headings, and a clickable value - the one bound to the listbox.
I was having trouble with the display using the subreport. Maybe I had some option incorrectly set but the listbox works just as I need it to. I'd appreciate your take on the "very different" things that they do. I don't say I'm right. I say I've used list boxes and subforms for 25 years and more. I don't find them so different. They are both used to display a recordset on a form - the listbox more economically space wise and time wise. By the way my original question was solved. I made the mistake of using a joined query on the report instead of just the header table.
 
n my use of them, they are similar.
You didn't understand what I was telling you. Feel free to misuse any Access object you choose for as many more years as you can;). Live long and prosper. The two are as similar as a spreadsheet and a table in DS view. Just because a looks like b doesn't make them the same or give them the same properties and methods. If they were interchangeable, there wouldn't be two distinct object types. Fixing the display properties to change the way the subreport renders would have been far simpler.
 
That's fair because you didn't understand what I was telling you either. MY point was that I'll use any tool that's available, to reach my goal. That is regardless of whether it is orthodox or not - doesn't matter to me. I'm trying to accomplish something here - get some questions answered - not to show off my knowledge. I'm really busy.
As a matter of fact I did spend the time to change it over to a subreport and you know what? The end result is nearly identical to what I had. Which is creating a printable invoice. The output is identical except for the alternate colored rows. bfd. So you say and keep insisting that they are so very very different - yet the end result is identical.
 
Last edited:
That's fair because you didn't understand what I was telling you either. MY point was that I'll use any tool that's available, to reach my goal. That is regardless of whether it is orthodox or not - doesn't matter to me.
I heard you loud and clear. When you use a tool such as Access, it is always best to understand the tool and its capabilities so you know which object to use to achieve your goal. Apparently a long time ago, you didn't know how to control a subform and so substituted a listbox and used code to make it work. OK. You got it to work. Good for you. There are lots of things you can do with Access that are out of the ordinary. It was designed to be flexible. Sometimes you have to be creative. It's really hard to drill a hole in a cabinet using a screwdriver but not impossible. The point is - when the tool box has two similar looking tools, they are optimized for different tasks and you should learn the proper use of each rather than assuming them to be interchangeable and not even questioning why there are two objects that do the same thing.

At least you satisfied yourself that you could control the subreport to work the way you wanted it to. That's progress;)
 
Hearing loud and clear isn't the same thing as understanding, apparently.
I've tried to be as polite and respectful as possible, faced with an attitude of, basically, I'm right because I say so.
You don't support your position with examples of when or why you would choose one over the other, or explain the big big difference between these two methods that yield identical output - one (the list box) being faster and more efficient, with fewer moving parts. Instead you keep reinforcing your idea that I'm misusing the tools (which I may be but if it works it works and there's always another way someone has figured out to do something).
Yes good for me - live long and prosper - what a resounding show of confidence in my knowledge and experience, which as you might imagine I don't enjoy being trivialized. There I things I can tell you, that you don't already know. Nice chatting with you. Now, back to work for me.
 
Last edited:
Back to work for all of us. No one is interested in this discussion so you may have the last word.
 
Libre,
I appreciate your thinking out of the box in using a listbox as a subreport. If it meets all of your requirements, that’s great. Like anything else in Access, it’s always best to develop with future enhancements in mind. Most of the time, it’s our unnormalized table structures that make future improvements more difficult.

In the case of a listbox in place of a subreport, you lose totals, formatting of any kind including conditional, pagination, can grow row height, and other future enhancements.

Most of us owe it to our customers to not develop into a dead end street.
 
I get it.
Thanks all for the helpful commentary.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom