By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,694 Members | 1,795 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,694 IT Pros & Developers. It's quick & easy.

Report print

P: 9
Hi - I haven't built a report in years and may have lost the basics....
I am creating a report for a single contract I send to a single customer.
Portrait .25" margins all around so I have 8" width and 10.5" height. I am having trouble printing in order the way I need, and am looking for instruction how to set that up in VBA.
Record source is a query with parameters.
It has these sections:
Page Header .625"
Group header, 1.5" is set to Keep Together in the property sheet, and Keep whole group together on one page in the group,sort.
Detail .2917 and can be 1 - 60 rows, is set to No in the property sheet
Group footer, 1.2917" is set to Keep together in the property sheet, and Keep whole group together on one page in the group,sort.
Page footer, 6.25" is a bunch of terms and conditions, and I still have to add the signatures at the bottom.

I'm not sure I set this correct in the properties.
The records I'm working in now has 8 rows and My page footer seems to be fixing this sizing because it is breaking the page at 3". I'm getting page and group header with 2 records on the first page, 6 records on the 2nd page, then the group footer on the third. The page footer is the same on each page.

What I need to do is
1.) figure out if I'm confusing it with my keep togethers?
2.) in vba - count the rows in the detail section, determine the height, and force the group footer under it (most commonly will be on the first page), then start my page footer letting that break to the second page.

I do not know how to write the count in sql, or loop through the syntax in vba.
My details are CHPID, Description, price, ext - I need a count of the CHPID in the record source.
Can anyone show some examples I could modify?
Can a page footer have a page break?
Should I use report header and footer?

Thank you for any holes you can plug up!!!!
I've attached some visual aids......
Attached Files
File Type: pdf 購銷合同 Product purchase and sale contract ENGLISH.pdf (136.5 KB, 25 views)
File Type: pdf SELECT qryPS4rptContract1.pdf (173.6 KB, 21 views)
File Type: pdf rptPSSContract.pdf (163.3 KB, 29 views)
Jan 29 '19 #1
Share this Question
Share on Google+
2 Replies


twinnyfo
Expert Mod 2.5K+
P: 3,135
I think I kind of understand what you are trying to get at, but your description and list of questions are not quite so clear that I can give you any purposeful advice.

Your attachment with the SQL is not helpful, other than to show you are using eight records. What happens if you have 12 records? 25? Only 1?

Are these contracts intended to fit on one page? If not, then little else really matters--other than simple preference.

Concerning keeping things together, because your footers are rather large and contain multiple controls, keep in mind that a single control will never be split between multiple pages. But, you can keep the entire section together--which it appears you are able to do.

If the general contract always flows to two pages, then a simple reorganization of your contract may make things a bit, but I am not on a place to tell you that is what you need to do.

If your sole intent is to keep everything on one page, then that is a nearly impossible task, as your customers may order many products. It may be wiser to have a first page, listing the order inventory and total cost, and a second page listing all the contractual agreements.

Not sure how much this hepps, but I am willing to work through details if you can perhaps explain a bit better.
Jan 29 '19 #2

P: 9
Thank you twinnyfo - you gave me a lot of clarity here!
My frustration has lowered!!
So, yes, these will always be 2-pages.
I'm going to play with it some more which may cause more questions.
Wish me luck! I want these live by Feb 5........
Jan 30 '19 #3

Post your reply

Sign in to post your reply or Sign up for a free account.