[AccessD] OT: Report Generator in .Net

dmcafee at pacbell.net dmcafee at pacbell.net
Thu Feb 24 17:10:49 CST 2005


I thought you were looking for a datagrid control for a specific purpose.
If you are just looking for grids on a report, and any of those boxes will
grow, then do the following:

1. Place them all in a line, and set their tag property to something like
"Colored"
2. Make the border for each of these text boxes transparent.
3. Place a Horizontal line above and below each of these text boxes (across
the full length)
4. Place the following code in the report's Detail_Format event:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim ctl As Control
  Me.ScaleMode = 5
  For Each ctl In Me.Controls
    If ctl.Tag = "Colored" Then
        Me.Line ((ctl.Left / 1440), 0)-((ctl.Left / 1440), 10)
        Me.Line (((ctl.Left + ctl.Width) / 1440), 0)-(((ctl.Left +
ctl.Width) / 1440), 10)
    End If
  Next ctl
End Sub


HTH
David
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Stuart
McLachlan
Sent: Thursday, February 24, 2005 2:24 PM
To: Access Developers discussion and problemsolving
Subject: Re: [AccessD] OT: Report Generator in .Net


On 24 Feb 2005 at 7:39, Steve Erbach wrote:

> Charlotte,
>
> All right, then. I thought I'd mentioned that I was looking for a grid
> on my reports. I've actually come up with a way to do it without
> having to write any code. I set the background color of the report to
> gray and then I make all the text boxes with a white background and
> size and position them so that they're almost touching each other.
> Voilà! A grid.
>

It's much easier to set a small GridX and GridY and set SnapToGrid on so
that all your text boxes actually touch each other. Then just set the
border style, colour and width of the textboxes to give you exactly the
grid you want without needing to worry about carefully locating every
control with just the right spacing.


--
Stuart


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list