Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2006
    Posts
    4

    Unanswered: MS Access Report: Can Grow property set to Yes or No versus Line Space?

    CAN GROW: YES ---Adds extra space between report lines


    I have a MS Access report that I have created with a custom paper size of 5.75 inch x 1.75 inch , and the fields in this report are set to Font Size: 6

    I have set height of all fields in report to 0.09" this is the height I want so that there is no extra space between lines --- The report looks fine with exact line spacing how I want ( with Can Grow: No)

    BUT when I change the CAN GROW property of all fields to: YES it adds the extra space between the lines that I do not want.

    I have tried to reduce the space between the lines by VBA code

    VBA Private Sub Report_Open(Cancel As Integer)

    Me.Detail.Height = 30
    rpt.Section(acDetail).Height = 30

    but this dose not have any effect on space between line it can increase space between line if I set height to more than 150 but below 150 it dose not reduce the line space.

    It has to do some thing with CAN GROW: YES properties

    Can anyone suggest me how can I fix this problem

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    .cangrow lets the box grow so that the contents fit.

    windows' idea of fit for 6pt Tahoma is a height of 0.317cm (in your archaic units, this is a touch over 0.12"). i doubt you will persuade Mr. Gates to change windows' internal concept of fit just to suit your report, so it seems likely that you will have to live without .cangrow

    what is the problem that you were hoping .cangrow would address?

    izy

    CORRECTION: Arial 6pt 'fit' is 0.317cm, Tahoma 6pt 'fit' is 0.344cm
    Last edited by izyrider; 12-02-06 at 13:37.
    currently using SS 2008R2

  3. #3
    Join Date
    Dec 2006
    Posts
    4
    Is there a way to give conditional cangrow for example if the number of characters in a filed is greater than say 100 it can grow else do not grow.

    I am trying to fit 31 to 37 lines in my custom paper size report , and my data structure is such that for all structure type only the first record is greater than 150 and all remaining are below 100 characters.

    So it will be ideal if the cangrow property work only for first row and after that the remaining row need not expand/grow.

    This will give the result that I want but I am not able to set cangrow property to yes based on a criteria ,

    Is this Possible ????

    Thanks
    Rahul

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    can you get there with code in the detail_format of the report?
    i don't think you can set .cangrow but you can probably do .sizetofit

    or - you could use the DrawText API to draw the text directly on to the report. have a look at TextWidth-Height (which is actually TextHeightWidth.zip) on lebans.com which shows how to handle DrawText in a report (tho he is not trying to address your issue directly).
    one solution could be to modify lebans' code to split your text into single line-width lumps and then draw the text exactly where you want it.
    google DrawText API for some more examples since you will need some stuff that lebans' does not use in his example code.

    ...it is not going to be easy tho !

    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Can you reduce the box size so that it basically is just a line. I did this and there was no space until information was actually in the box.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •