A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Adding Blank Rows after the last Detail of the Report



 
 
Thread Tools Display Modes
  #1  
Old February 2nd, 2010, 12:23 AM posted to microsoft.public.access.reports
Ms. Confused
external usenet poster
 
Posts: 1
Default Adding Blank Rows after the last Detail of the Report

Hi All,
I've used this code from Dwayne:

Private Sub Report_Page()

Dim intNumLines As Integer

Dim intLineNumber As Integer

Dim intTopMargin As Integer

Dim ctl As Control

Dim intLineHeight As Integer

intNumLines = 12

intTopMargin = Me.Section(3).Height

intLineHeight = Me.Section(0).Height

For Each ctl In Me.Section(0).Controls

For intLineNumber = 0 To intNumLines - 1

Me.Line (ctl.Left, intTopMargin + _

(intLineNumber * intLineHeight)) - _

Step(ctl.Width, intLineHeight), , B

Next

Next

End Sub

My report needs to print blank rows (at least 12) after the last data is
printed. We have walk in clients that needs to be added in all our class
subjects in school.
I did put this on the event at "On Page", but it always print eventhough
there is data instead of printing after the last record. I am now looking at
blank rows on top of my data. All the remaining pages looks good though.

Please help.
Thanks.
Ms. Confused


  #2  
Old February 2nd, 2010, 01:04 AM posted to microsoft.public.access.reports
Steve[_77_]
external usenet poster
 
Posts: 1,017
Default Adding Blank Rows after the last Detail of the Report

Gather the data that you need to print in a query. Create a second query
that returns only blank lines, Set it up so the number of blank lines is
what you need to fill the page. Make a union query out of the two queries.
Use the union query as the recordsource of your report.

Steve




"Ms. Confused" Ms.
wrote in message
...
Hi All,
I've used this code from Dwayne:

Private Sub Report_Page()

Dim intNumLines As Integer

Dim intLineNumber As Integer

Dim intTopMargin As Integer

Dim ctl As Control

Dim intLineHeight As Integer

intNumLines = 12

intTopMargin = Me.Section(3).Height

intLineHeight = Me.Section(0).Height

For Each ctl In Me.Section(0).Controls

For intLineNumber = 0 To intNumLines - 1

Me.Line (ctl.Left, intTopMargin + _

(intLineNumber * intLineHeight)) - _

Step(ctl.Width, intLineHeight), , B

Next

Next

End Sub

My report needs to print blank rows (at least 12) after the last data is
printed. We have walk in clients that needs to be added in all our class
subjects in school.
I did put this on the event at "On Page", but it always print eventhough
there is data instead of printing after the last record. I am now looking
at
blank rows on top of my data. All the remaining pages looks good though.

Please help.
Thanks.
Ms. Confused




  #3  
Old February 2nd, 2010, 02:35 AM posted to microsoft.public.access.reports
Duane Hookom[_4_]
external usenet poster
 
Posts: 316
Default Adding Blank Rows after the last Detail of the Report

There should be no need for code or a union query. Simply create a Report
Footer (or Group Footer) that is tall enough for you to add 12 horizontal
lines.

Duane Hookom
MS Access MVP

"Ms. Confused" Ms. wrote in message
...
Hi All,
I've used this code from Dwayne:

Private Sub Report_Page()

Dim intNumLines As Integer

Dim intLineNumber As Integer

Dim intTopMargin As Integer

Dim ctl As Control

Dim intLineHeight As Integer

intNumLines = 12

intTopMargin = Me.Section(3).Height

intLineHeight = Me.Section(0).Height

For Each ctl In Me.Section(0).Controls

For intLineNumber = 0 To intNumLines - 1

Me.Line (ctl.Left, intTopMargin + _

(intLineNumber * intLineHeight)) - _

Step(ctl.Width, intLineHeight), , B

Next

Next

End Sub

My report needs to print blank rows (at least 12) after the last data is
printed. We have walk in clients that needs to be added in all our class
subjects in school.
I did put this on the event at "On Page", but it always print eventhough
there is data instead of printing after the last record. I am now looking
at
blank rows on top of my data. All the remaining pages looks good though.

Please help.
Thanks.
Ms. Confused


  #4  
Old February 2nd, 2010, 03:16 PM posted to microsoft.public.access.reports
Ms. Confused[_2_]
external usenet poster
 
Posts: 1
Default Adding Blank Rows after the last Detail of the Report

@Steve - thank you so much for your suggestion but I was avoiding union
queries.

@Duane -
Thank you and it did worked after manipulating the report footer,
a little on the detail section, and adjusting the section height.

Sorry for misspelling your name.

Until next time!!!!
Ms. Confused No More

"Duane Hookom" wrote:

There should be no need for code or a union query. Simply create a Report
Footer (or Group Footer) that is tall enough for you to add 12 horizontal
lines.

Duane Hookom
MS Access MVP

"Ms. Confused" Ms. wrote in message
...
Hi All,
I've used this code from Dwayne:

Private Sub Report_Page()

Dim intNumLines As Integer

Dim intLineNumber As Integer

Dim intTopMargin As Integer

Dim ctl As Control

Dim intLineHeight As Integer

intNumLines = 12

intTopMargin = Me.Section(3).Height

intLineHeight = Me.Section(0).Height

For Each ctl In Me.Section(0).Controls

For intLineNumber = 0 To intNumLines - 1

Me.Line (ctl.Left, intTopMargin + _

(intLineNumber * intLineHeight)) - _

Step(ctl.Width, intLineHeight), , B

Next

Next

End Sub

My report needs to print blank rows (at least 12) after the last data is
printed. We have walk in clients that needs to be added in all our class
subjects in school.
I did put this on the event at "On Page", but it always print eventhough
there is data instead of printing after the last record. I am now looking
at
blank rows on top of my data. All the remaining pages looks good though.

Please help.
Thanks.
Ms. Confused


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:53 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.