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  

Subreport is not showing horizontal lines



 
 
Thread Tools Display Modes
  #11  
Old July 17th, 2007, 07:36 PM posted to microsoft.public.access.reports
jojo
external usenet poster
 
Posts: 83
Default Subreport is not showing horizontal lines

Thanks Duane, I finally got it figured out. I took out the other code and
put in the new code below. It's probably not the best but it worked. I put
it in the main reports OnPage event.

Private Sub Report_Page()
Me.Line (0.0001 * 1440, 3449)-Step(0, 3675)
Me.Line (0.6856 * 1440, 3449)-Step(0, 3675)
Me.Line (1.2 * 1440, 3449)-Step(0, 3675)
Me.Line (2.9 * 1440, 3449)-Step(0, 4000)
Me.Line (3.58 * 1440, 3449)-Step(0, 4000)
Me.Line (3.85 * 1440, 3449)-Step(0, 3675)
Me.Line (4.6 * 1440, 3449)-Step(0, 3675)
Me.Line (5.1144 * 1440, 3449)-Step(0, 3675)
Me.Line (6.8144 * 1440, 3449)-Step(0, 4000)
Me.Line (7.475 * 1440, 3449)-Step(0, 4000)
Me.Line (0 * 1440, 3730)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 3730)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 4000)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 4000)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 4260)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 4260)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 4530)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 4530)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 4800)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 4800)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 5080)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 5080)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 5350)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 5350)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 5630)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 5630)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 5920)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 5920)-Step(3.619 * 1440, 0)
Me.Line (0 * 1440, 6220)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 6220)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 6520)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 6520)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 6820)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 6820)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 7120)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 7120)-Step(3.619 * 1440, 0)
Me.Line (2.9 * 1440, 7445)-Step(0.675 * 1440, 0)
Me.Line (6.8144 * 1440, 7445)-Step(0.673 * 1440, 0)
End Sub

If you have a shorter method I'd be glad to see it. Thanks again for your
help.

--
MADBLover


"Duane Hookom" wrote:

If the code is in the main report then you shouldn't need to comment out the
line.
--
Duane Hookom
Microsoft Access MVP


"JoJo" wrote:

I'm so sorry for causing confusion, I tried to go back and correct myself
before the message posted but it was too late. I'm going to try commenting
out the intPageHeadHeight = Me.Section(3).Height and add the debug statement
then I'll get back with you to let you know how it went . Thanks for
volunteering your time, I know it must be a challenge to deal with people who
don't know, but like to think they know, what they're doing.
--
MADBLover


"Duane Hookom" wrote:

I answered before you stated the code was in the main report. Your earlier
statements confused me since I didn't think they would fire in a subreport.
To debug, you would add a line of code to display a message box or write
something to the debug window like:

MsgBox "The On Page of the Subreport is Firing"
or
Debug.Print "The On..."

--
Duane Hookom
Microsoft Access MVP


"JoJo" wrote:

What about the other intPageHeadHeights in other parts of the code? Should
they come out? How do you add and what is debugging code?
--
MADBLover


"Duane Hookom" wrote:

I would first try comment out
intPageHeadHeight = Me.Section(3).Height
I would also add some debugging code to see if the code is firing.
--
Duane Hookom
Microsoft Access MVP


"JoJo" wrote:

First let me say that I meant the vertical lines are showing up fine in the
subreport but the horizontal lines aren't. Only one vertical line is showing
up in the report header of the regular report. Okay, do you have a solution?
I am leaving my job to move out of state and only have a few days left, so
if you could help me with this it would be much appreciated.

Thank you!

--
MADBLover


"Duane Hookom" wrote:

The On Page event never fires in a subreport. You would need to use another
event or find another solution.

--
Duane Hookom
Microsoft Access MVP


"JoJo" wrote:

Can someone please help me figure out why the horizontal lines are not
showing up in the subreport? Below is the code for vertical and horizontal
lines used in a report for a subreport that was put into a report. The
regular report is a one column report with the subreport being a two column
report. The vertical lines in the code of the report are showing up just
fine but for some reason there is only one horizontal line showing up in the
report header of the report (not subreport). Does this make sense? Here is
the code.

Me.Line (0.0001 * 1440, 3449)-Step(0, 3350)
Me.Line (0.6856 * 1440, 3449)-Step(0, 3350)
Me.Line (1.2 * 1440, 3449)-Step(0, 3350)
Me.Line (2.9 * 1440, 3449)-Step(0, 3610)
Me.Line (3.58 * 1440, 3449)-Step(0, 3610)
Me.Line (3.85 * 1440, 3449)-Step(0, 3350)
Me.Line (4.6 * 1440, 3449)-Step(0, 3350)
Me.Line (5.1144 * 1440, 3449)-Step(0, 3350)
Me.Line (6.8144 * 1440, 3449)-Step(0, 3610)
Me.Line (7.51 * 1440, 3449)-Step(0, 3610)


Dim intNumLines As Integer
Dim intLineNum As Integer
Dim intDetailHeight As Integer
Dim intPageHeadHeight As Integer
On Error GoTo Report_Page_Error

intNumLines = 14
intDetailHeight = Me.Section(acDetail).Height
intPageHeadHeight = Me.Section(3).Height
For intLineNum = 1 To intNumLines
Me.CurrentY = (intLineNum) * intDetailHeight + intPageHeadHeight
Me.CurrentX = 0
Me.Line (0, intPageHeadHeight + intLineNum * intDetailHeight)- _
Step(Me.Width, 0)
Next
On Error GoTo 0
Exit Sub

Report_Page_Error:
Select Case Err
Case 2462 'no page header
intPageHeadHeight = 0
Resume Next
End Select
MsgBox "Error" & Err.Number & "(" & Err.Description & _
")in procedure Report_Page of VBA Document Report_Report1"

Thank you ever so much!
--
MADBLover

  #12  
Old July 17th, 2007, 08:32 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Subreport is not showing horizontal lines

If there is a repeating pattern or interval, I generally will write code that
uses a For Next loop. I sometimes place invisible controls on the report to
use as start points and set their Tag property to some value. I can then loop
through the controls to find particular tag values and draw lines based on
the Top and/or Left properties of the control.
--
Duane Hookom
Microsoft Access MVP


"JoJo" wrote:

Thanks Duane, I finally got it figured out. I took out the other code and
put in the new code below. It's probably not the best but it worked. I put
it in the main reports OnPage event.

Private Sub Report_Page()
Me.Line (0.0001 * 1440, 3449)-Step(0, 3675)
Me.Line (0.6856 * 1440, 3449)-Step(0, 3675)
Me.Line (1.2 * 1440, 3449)-Step(0, 3675)
Me.Line (2.9 * 1440, 3449)-Step(0, 4000)
Me.Line (3.58 * 1440, 3449)-Step(0, 4000)
Me.Line (3.85 * 1440, 3449)-Step(0, 3675)
Me.Line (4.6 * 1440, 3449)-Step(0, 3675)
Me.Line (5.1144 * 1440, 3449)-Step(0, 3675)
Me.Line (6.8144 * 1440, 3449)-Step(0, 4000)
Me.Line (7.475 * 1440, 3449)-Step(0, 4000)
Me.Line (0 * 1440, 3730)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 3730)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 4000)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 4000)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 4260)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 4260)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 4530)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 4530)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 4800)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 4800)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 5080)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 5080)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 5350)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 5350)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 5630)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 5630)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 5920)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 5920)-Step(3.619 * 1440, 0)
Me.Line (0 * 1440, 6220)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 6220)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 6520)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 6520)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 6820)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 6820)-Step(3.62 * 1440, 0)
Me.Line (0 * 1440, 7120)-Step(3.58 * 1440, 0)
Me.Line (3.85 * 1440, 7120)-Step(3.619 * 1440, 0)
Me.Line (2.9 * 1440, 7445)-Step(0.675 * 1440, 0)
Me.Line (6.8144 * 1440, 7445)-Step(0.673 * 1440, 0)
End Sub

If you have a shorter method I'd be glad to see it. Thanks again for your
help.

--
MADBLover


"Duane Hookom" wrote:

If the code is in the main report then you shouldn't need to comment out the
line.
--
Duane Hookom
Microsoft Access MVP


"JoJo" wrote:

I'm so sorry for causing confusion, I tried to go back and correct myself
before the message posted but it was too late. I'm going to try commenting
out the intPageHeadHeight = Me.Section(3).Height and add the debug statement
then I'll get back with you to let you know how it went . Thanks for
volunteering your time, I know it must be a challenge to deal with people who
don't know, but like to think they know, what they're doing.
--
MADBLover


"Duane Hookom" wrote:

I answered before you stated the code was in the main report. Your earlier
statements confused me since I didn't think they would fire in a subreport.
To debug, you would add a line of code to display a message box or write
something to the debug window like:

MsgBox "The On Page of the Subreport is Firing"
or
Debug.Print "The On..."

--
Duane Hookom
Microsoft Access MVP


"JoJo" wrote:

What about the other intPageHeadHeights in other parts of the code? Should
they come out? How do you add and what is debugging code?
--
MADBLover


"Duane Hookom" wrote:

I would first try comment out
intPageHeadHeight = Me.Section(3).Height
I would also add some debugging code to see if the code is firing.
--
Duane Hookom
Microsoft Access MVP


"JoJo" wrote:

First let me say that I meant the vertical lines are showing up fine in the
subreport but the horizontal lines aren't. Only one vertical line is showing
up in the report header of the regular report. Okay, do you have a solution?
I am leaving my job to move out of state and only have a few days left, so
if you could help me with this it would be much appreciated.

Thank you!

--
MADBLover


"Duane Hookom" wrote:

The On Page event never fires in a subreport. You would need to use another
event or find another solution.

--
Duane Hookom
Microsoft Access MVP


"JoJo" wrote:

Can someone please help me figure out why the horizontal lines are not
showing up in the subreport? Below is the code for vertical and horizontal
lines used in a report for a subreport that was put into a report. The
regular report is a one column report with the subreport being a two column
report. The vertical lines in the code of the report are showing up just
fine but for some reason there is only one horizontal line showing up in the
report header of the report (not subreport). Does this make sense? Here is
the code.

Me.Line (0.0001 * 1440, 3449)-Step(0, 3350)
Me.Line (0.6856 * 1440, 3449)-Step(0, 3350)
Me.Line (1.2 * 1440, 3449)-Step(0, 3350)
Me.Line (2.9 * 1440, 3449)-Step(0, 3610)
Me.Line (3.58 * 1440, 3449)-Step(0, 3610)
Me.Line (3.85 * 1440, 3449)-Step(0, 3350)
Me.Line (4.6 * 1440, 3449)-Step(0, 3350)
Me.Line (5.1144 * 1440, 3449)-Step(0, 3350)
Me.Line (6.8144 * 1440, 3449)-Step(0, 3610)
Me.Line (7.51 * 1440, 3449)-Step(0, 3610)


Dim intNumLines As Integer
Dim intLineNum As Integer
Dim intDetailHeight As Integer
Dim intPageHeadHeight As Integer
On Error GoTo Report_Page_Error

intNumLines = 14
intDetailHeight = Me.Section(acDetail).Height
intPageHeadHeight = Me.Section(3).Height
For intLineNum = 1 To intNumLines
Me.CurrentY = (intLineNum) * intDetailHeight + intPageHeadHeight
Me.CurrentX = 0
Me.Line (0, intPageHeadHeight + intLineNum * intDetailHeight)- _
Step(Me.Width, 0)
Next
On Error GoTo 0
Exit Sub

Report_Page_Error:
Select Case Err
Case 2462 'no page header
intPageHeadHeight = 0
Resume Next
End Select
MsgBox "Error" & Err.Number & "(" & Err.Description & _
")in procedure Report_Page of VBA Document Report_Report1"

Thank you ever so much!
--
MADBLover

 




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 05:35 PM.


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