WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Help with drawing horizontal line in Access subreport 2003

 
Goto page Previous  1, 2, 3
   Home -> Office other -> Reports RSS
Next:  Cannot Change Report Page Size Access 2007  
Author Message
Marshall Barton

External


Since: Dec 07, 2003
Posts: 6121



(Msg. 17) Posted: Sun Jul 27, 2008 10:57 pm
Post subject: Re: Help with drawing horizontal line in Access subreport 2003 [Login to view extended thread Info.]
Archived from groups: microsoft>public>access>reports (more info?)

jeremy.wy.chong DeleteThis @gmail.com wrote:

>Thanks heaps for your help Marshall, it is much appreciated.


Does that mean that you have found a way to get what you
want? If so, please explain what you did so we can all
learn from it.

If you have not suceeded, then I still need to know how to
determine the vertical position of the line in the detail
section (at the very bottom?) along with the line's
horizontal starting point and either its end point or
length.

I am still struggling to find a block of time to investigate
an idea. Tomorrow morning may be a possibility.

--
Marsh
MVP [MS Access]
Back to top
Login to vote
Marshall Barton

External


Since: Dec 07, 2003
Posts: 6121



(Msg. 18) Posted: Mon Jul 28, 2008 1:12 pm
Post subject: Re: Help with drawing horizontal line in Access subreport 2003 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

jeremy.wy.chong.RemoveThis@gmail.com wrote:

>I gave it a go but I have no idea what sort of syntax to use to check
>if that subreport is showing on the current page of the main
>report..... it also makes it very tricky that the subreport I am
>checking is actually a subreport in a subreport of the main report...


Well, this seems to work in my quicky tests:

Main report code:
---------------------------------------------------------
Public glngTopMargin As Long
Public glngY As Long, glngX As Long, glngW As Long

Private Sub Report_Open(Cancel As Integer)
glngTopMargin = Me.Printer.TOPMARGIN
End Sub

Private Sub Report_Page()
If glngW > 0 Then
Me.Line (glngX, glngY - glngTopMargin)-Step(glngW,
0), vbRed
End If
End Sub
---------------------------------------------------------

Subreport code:
---------------------------------------------------------
Private Sub Detail_Print(Cancel As Integer, PrintCount As
Integer)
With Reports!report11
.glngY = IIf(.Top > 0, .Top, .glngTopMargin) _
+ Me.Top + Me.FreeText.Top + Me.FreeText.Height
.glngX = Me.Left + Me.FreeText.Left
.glngW = Me.FreeText.Width
End With
End Sub

Private Sub ReportFooter_Format(Cancel As Integer,
FormatCount As Integer)
Reports!report11.glngW = 0
End Sub
---------------------------------------------------------

Watch out for line wrapping.

In that code, the main report is named Report11

Since you never did get back to me with how you determine
the line's starting point and its width, I just used the
bottom of the FreeText text box in my test subreport.

I did not use a third level of subreport so you'll have to
add another another Top into the messy expression. I think
it could be something like:
.glngY = IIf(.Top > 0, .Top, .glngTopMargin) _
+ Parent.Top + Parent.firstsubreport.Top _
+ Me.Top + Me.FreeText.Top + Me.FreeText.Height

The subsubreport's detail section must gave its KeepTogether
property set to Yes.

--
Marsh
MVP [MS Access]
Back to top
Login to vote
jeremy.wy.chong

External


Since: Jul 20, 2008
Posts: 10



(Msg. 19) Posted: Mon Jul 28, 2008 1:14 pm
Post subject: Re: Help with drawing horizontal line in Access subreport 2003 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Sorry I wasn't able to answer your previous question quickly enough
but the solution you have given works perfectly! Thank you so much
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> Reports All times are: Eastern Time (US & Canada) (change)
Goto page Previous  1, 2, 3
Page 3 of 3

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET