By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,486 Members | 2,169 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,486 IT Pros & Developers. It's quick & easy.

vertical line between snaking columns in ms access reports

P: 6
In Access 2003 I have a multi-column report (3 columns).
I would like to get 1 continuous vertical line from the top of the page to the bottom of the page, between columns 1 and 2 and between columns 2 and 3.

Is there anyway to create this line?

If so, is there any way to print this line only if there would data in the column to the right of the line?
Aug 16 '08 #1
Share this Question
Share on Google+
5 Replies


ADezii
Expert 5K+
P: 8,597
The code to dynamically draw Lines in a Report must be placed in the Print() Event of the Report's Detail Section. The following code will draw a Vertical Red Line, 25 Pixels wide, exactly 1000 Pixels from the Left Margin of the Report, spanning the entire Vertical Length of the Report.
Expand|Select|Wrap|Line Numbers
  1. Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
  2. Dim lngColor As Long
  3.  
  4. Me.ScaleMode = 3    'Pixels
  5. Me.DrawWidth = 25   'in Pixels
  6.  
  7. lngColor = RGB(255, 0, 0)       'Red
  8.  
  9. Me.Line (1000, 0)-(1000, Me.ScaleHeight), lngColor
  10. End Sub
Aug 16 '08 #2

P: 6
Thank you! I can now get the lines. I am, however, having a slight problem. I'm getting a slight break in the lines on the report between detail lines and also between groups, so it's not an absolutely solid line.

My report would be:

Allen, Michael
100 Main St.
Anyplace, US
..Allen car1
..Allen car2

Axelrod, Timothy
200 Elm St
Sunrise, US
.. Axelrod car1
.. Axelrod car2

The personal information is in a group header and the cars are in the detail section.

I'm getting slight breaks in the line between Allen car 1 and Allen car 2, between Alexrod car 1 and Axelrod car2, and between Allen Car 2 and Alexrod, Timothy.
Am I doing something wrong, or is there any way to fix this?

Also, the data in the columns are not always the same length because people have different number of cars. The line is only extending down as far as the last detail line, and I understand why, but is there any solution for that?
Thank you.
Aug 16 '08 #3

ADezii
Expert 5K+
P: 8,597
Thank you! I can now get the lines. I am, however, having a slight problem. I'm getting a slight break in the lines on the report between detail lines and also between groups, so it's not an absolutely solid line.

My report would be:

Allen, Michael
100 Main St.
Anyplace, US
..Allen car1
..Allen car2

Axelrod, Timothy
200 Elm St
Sunrise, US
.. Axelrod car1
.. Axelrod car2

The personal information is in a group header and the cars are in the detail section.

I'm getting slight breaks in the line between Allen car 1 and Allen car 2, between Alexrod car 1 and Axelrod car2, and between Allen Car 2 and Alexrod, Timothy.
Am I doing something wrong, or is there any way to fix this?

Also, the data in the columns are not always the same length because people have different number of cars. The line is only extending down as far as the last detail line, and I understand why, but is there any solution for that?
Thank you.
I would actually have to physically look at the Report and its layout, in order to even venture a guess as to what is causing this.
Aug 17 '08 #4

P: 6
Thanks. I can't send the report due to the data. I could send the code. I tried this on all my other reports which I am making snaking columns which I could send, and unfortunately (or fortunately) it is working with them. So it definitely helped me on the others. I'll have to keep plugging away on this one. Thank you.
Aug 20 '08 #5

P: n/a
Changing ScaleHeight to Height seemed to solve the problem for me.

I was getting gaps because some fields had CanGrow = true
Oct 1 '10 #6

Post your reply

Sign in to post your reply or Sign up for a free account.