#1
  1. Just another guy
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Jun 2003
    Location
    Wisconsin
    Posts
    2,953
    Rep Power
    262

    Setting field heights


    This should (hopefully!) be the last of my questions in the ongoing "Data Reports" series.
    Is there a way to set the height of the fields in the data report so that they do not shrink to fit the height of the font used? Changing the size of the font is not what I want to do, the fields contain only a period (.), which I want to keep small and unnoticed. (Its only there to make the field border visible). As it is, it doesn't matter what height I make the fields when I'm designing the form, it is always the same height in runtime. Is there a property or something to change this? I couldn't find one looking on msdn, but I didn't really know what I was after.
    Thanks in advance
    --Dave--

    U2kgSG9jIExlZ2VyZSBTY2lzLCBOaW1pdW0gRXJ1ZGl0aW9uaXMgSGFiZXM=

    My hobby: collecting US coins
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    Location
    No es importante
    Posts
    2,065
    Rep Power
    14
    Is the field set to autogrow? You could attempt to set the field properties at run time by placing code in the report initialize module.
  4. #3
  5. Just another guy
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Jun 2003
    Location
    Wisconsin
    Posts
    2,953
    Rep Power
    262
    The "cangrow" property is set to "false". I'm not sure I know what you mean when you refer to the "report initialize module". Can you be a little more specific, or at least tell me what I should be searching for on google? Thanks
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    Location
    No es importante
    Posts
    2,065
    Rep Power
    14
    Option Explicit
    Private Sub DataReport_Initialize()
    On Error GoTo Err_initialize
    'You can run code before each report is generated.
    'Here you can attempt to set the field properites.
    dataReport.Sections(x).Controls.Item(Y).Height = a
    dataReport.Sections(x).Controls.Item(Y).Width = b


    Exit_initialize:
    Exit Sub
    Err_initialize:
    Resume Exit_initialize:
    End Sub
  8. #5
  9. Just another guy
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Jun 2003
    Location
    Wisconsin
    Posts
    2,953
    Rep Power
    262
    Well, a change in the project means I don't have to use this anymore, but thanks for the solution anyway. It could be helpful on the next project.

IMN logo majestic logo threadwatch logo seochat tools logo