Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can't get can grow to grow all cols the same height

Status
Not open for further replies.

cmmsi

MIS
Feb 28, 2003
46
US
Hello. I have a tabular report that generates properly with the 'can grow' property growing the height to display all the data in each column.

However, it will not grow the border to the maximum height of the largest column.

I wish to do this to generate a sort of grid, and currently, it looks rather jagged and harder to read, as it is in 17 by 11 paper with about 30 columns.

Can anyone suggest how I could generate the report in tabular format and grow the border of eache 'cell' in the report to the tallest cell on each row?

Thank you in advance.
 
Is this a multi-column report (set in the page layout)?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
In page setup on the columns tab, whether I change the number of columns or not, it does not seem to make a difference.
 
What border doesn't grow? It isn't clear whether the report is designed as a multi-column report or if you just have many fields listed across the detail section in columns.

You may need to use the Line method of the report to draw your rectangles. Stephen Lebans has code at that does this. You would need to find the printlines code.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Gotcha. The problem now is that of 5 columns, columns 3 and 4 can have extra data that cause them to grow, and that is ok.

But the desired format is to enclose each column on each row in a box of the same height, whether there is data in each column to justtify the heght or not. Currently, it is like a jagged edge where the tops are all the same, but the bottoms of each virtual cell are of different heights and the border shows this - kind of like an inverted city skyline.

Will check out the code, but for now, have found that dumping to excel will do the trick - a little messy, but it works for now.

Many thanks.
 
Individually the columns can / will only "Grow" to the height necessary to display the info in the given control. The Scheme discused will not generally result in the Grid like appearance/results you seem to want.

A way to do it is to find the height of each control in the "row" (actually SECTION), ge the MAX of those values and draw a line at that (ending) position. You can draw the "TOP: line at the Zero position of the section. The height of the vertical lines need to be set to the total height of the SECTION afterwards.

This sounds somewhat complicated for the average practicioner. It is. There are some sample procedures here (in Tek-Tips) which might help you get started, but then if you were interested in doing the work, you would have alread availed yourself of the oppoirtunity to search the site.




MichaelRed


 
cmmsi,
I wish you would just state that "some text boxes grow more than others" rather than imply that your report has columns defined Page Setup. There is a huge difference.

The following code is taken from my calendar report at There are 5 separate subreports in the detail section of the main report. Any of these can grow taller than the others. The code finds the tallest and draws lines.
Code:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
    Dim lngHeight As Long 'store the height of tallest control
    Dim i As Integer
    Dim lngLeft As Long
    For i = 1 To 5
        'compare heights
        If Me("srpt" & i).Height > lngHeight Then
            lngHeight = Me("srpt" & i).Height
        End If
    Next
    'add the height of other control
    lngHeight = lngHeight + Me.txtDay1.Height
    'draw the lines
    For i = 0 To 5
        lngLeft = i * Me.srpt1.Width
        Me.Line (lngLeft, 0)-(lngLeft, lngHeight)
    Next
End Sub

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top