A set location for the Report summary (1 Viewer)

dcavaiani

Registered User.
Local time
Today, 07:40
Joined
May 26, 2014
Messages
385
Code:
 Private Sub DummyGroupFooter_Format(Cancel As Integer, FormatCount As Integer)
Dim footerPos As Long
' Dim countspace As Long
' countspace = countspace + 1
footerPos = 7.6 * 1440   'desired position of footer in inches * 1440 twips per inch)
    If Me.Top < footerPos Then
        Me.DummyGroupFooter.Height = footerPos - Me.Top
 
    Else
        Me.DummyGroupFooter.Height = footerPos
     End If
    
End Sub[code]

The code above allows me to always print the Invoice Summary at a SET location toward the bottom of the page.   The invoice can have a variable number of detail lines.  The invoice has some vertical column/grid lines between columns of the detail.  IS THERE ANY way to code the above so that the vertical lines can appear continuously down the page - all the way down to the start of the summary section ??
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:40
Joined
Oct 29, 2018
Messages
21,358
Hi. Which vertical lines were you referring to? Did you draw these lines on the report? Or, did you add these lines using code?
 

dcavaiani

Registered User.
Local time
Today, 07:40
Joined
May 26, 2014
Messages
385
Hi. Which vertical lines were you referring to? Did you draw these lines on the report? Or, did you add these lines using code?

They are lines drawn on the detail report section ...
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:40
Joined
Oct 29, 2018
Messages
21,358
They are lines drawn on the detail report section ...
Okay, thanks. Have you tried modifying their height properties in the Format property of the Detail section? Just a thought...
 

dcavaiani

Registered User.
Local time
Today, 07:40
Joined
May 26, 2014
Messages
385
No good as in they don't change or something else?

If I change the height of the Detail vertical lines, then the detail section just stretches way down the page for each detail line record. Some kind of modified code is needed in the Dummy Section.
 

Mark_

Longboard on the internet
Local time
Today, 05:40
Joined
Sep 12, 2017
Messages
2,111
You may need to calculate where the last detail line ends, then make the footer taller and have lines in the footer also. I haven't tried this before though.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:40
Joined
Oct 29, 2018
Messages
21,358
If I change the height of the Detail vertical lines, then the detail section just stretches way down the page for each detail line record. Some kind of modified code is needed in the Dummy Section.
Okay, I think I am starting to understand it now. Are you able to post a demo copy of your db, so we can play around with it?
 

Mark_

Longboard on the internet
Local time
Today, 05:40
Joined
Sep 12, 2017
Messages
2,111
How do I post the only the Table and the report ?

Create a new DB.
Import ONLY the report and the table into the new DB.
Delete all records that you don't want others to see and add in some sample data.
Compact/Repair then upload.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:40
Joined
Oct 29, 2018
Messages
21,358
Please don't forget to zip it up. Thank you.
 

dcavaiani

Registered User.
Local time
Today, 07:40
Joined
May 26, 2014
Messages
385
Here it is
 

Attachments

  • forumPost.accdb
    428 KB · Views: 125

Gasman

Enthusiastic Amateur
Local time
Today, 12:40
Joined
Sep 21, 2011
Messages
14,051
Zipped as as requested.
 

Attachments

  • forumPost.zip
    51.5 KB · Views: 125

Mark_

Longboard on the internet
Local time
Today, 05:40
Joined
Sep 12, 2017
Messages
2,111
Will you normally have more than one page for your invoice?
 

Mark_

Longboard on the internet
Local time
Today, 05:40
Joined
Sep 12, 2017
Messages
2,111
I think the trick will be to use your Report Page Footer. You will put in your lines there since it is normally 0 height. Count the number of matching records when you open the report (so you'll know how tall to make it on the LAST page) and keep a running total in the report's details. Once you are on the last record, set the Report Page Footer and your vertical line's height based on the number lines you have for that (last) page.

The fun part is counting it all. Got kinda busy so I can't do it at the moment, but if I get some time a little later I'll see what I can whip up.
 

Users who are viewing this thread

Top Bottom