Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    Brookings, South Dakota, USA
    Posts
    449
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Columns in ReportHeader only? (A2k2, SP2)

    Hi All,
    Is there a way to have columns in the Report Header only and *not* in the Detail section? or another method perhaps, that mimics the CanGrow/CanShrink properties, that I can use to meet the design requirements?
    The requirements are that if TextBox_2 has no data then TextBoxes_4 & 6 move up or if TextBoxes_2 & 4 have no data, TextBox_6 moves up into TextBox_2's position. Unfortunately, TextBoxes_1, 3 & 5 almost always have data, but if they do not, they too must be able to move accordingly.
    <pre>[Label/Title that is above and centered directly above the top row of TextBoxes]
    TextLabel_1 TextBox_1 TextLabel_2 TextBox_2
    TextLabel_3 TextBox_3 TextLabel_4 TextBox_4
    TextLabel_5 TextBox_5 TextLabel_6 TextBox_6
    </pre>


    Thank You.

    gdr
    <IMG SRC=http://www.wopr.com/w3tuserpics/gdrezek_sig.jpg>
    "Those who dance are considered insane by those who can't hear the music" - George Carlin

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Columns in ReportHeader only? (A2k2, SP2)

    It appears to me you've been given conflicting requirements - that is if both the order and the position have has to be preserved. One possibility you might try is to do two columns in the Detail area, and set it so things shrink, but the problem with that is that they will want to shrink up and accross if you have one that doesn't fit. I would also put both the labels and the data into a query and make the label a text box which also can grow. If the sequence would to be sneaking, that would work reasonably well, but if it must be across and then down, life gets complicated. Hope this gives you some ideas to at least try.
    Wendell

  3. #3
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    Brookings, South Dakota, USA
    Posts
    449
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Columns in ReportHeader only? (A2k2, SP2)

    Hi Wendell,
    Thank You.
    While reading your reply it triggered something that I think is a reasonable workaround to meet the req's and it seems to be holding to what I what it to do. I made 2 subreports, one each for each column, placed the TextBoxes in the Details section, set that section's and each TextBox in it to CanGrow/CanShrink, Yes. I kept the ReportHeader and Footer so I could use the OnFormat event, to place
    '----------------
    Dim ctl As Control
    For Each ctl In Me.Controls
    If TypeOf ctl Is TextBox Then
    If IsNull(ctl) Then
    ctl.Visible = False
    End If
    End If
    Next
    '------------------------

    but minimized the grid. On the Main Report I left the subreports properties to CanGrow, Yes; CanShrink, No. This was to preserve the distance between these TextBoxes and what follows them. As far as I can tell, the shrinking and visibility handles things just the way I had described them in my original post. Do you know of any idiosyncracies with reports that may come back and mess things up?
    Thank you again.

    gdr <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    <IMG SRC=http://www.wopr.com/w3tuserpics/gdrezek_sig.jpg>
    "Those who dance are considered insane by those who can't hear the music" - George Carlin

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Columns in ReportHeader only? (A2k2, SP2)

    I presumed you had several records to deal with and that might be a real problem, but it sounds like you found a solution. I don't know of any other gottcha's - glad I could trigger the neurons for you.
    Wendell

  5. #5
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    Brookings, South Dakota, USA
    Posts
    449
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Columns in ReportHeader only? (A2k2, SP2)

    Hi Wendell,
    Sorry about not mentioning that, I didn't even think about that and yes that would have been an extreme problem for me. I do have multiple records but I have to filter out for the correct one, so I used two fields for the Link Parent/Child fields.
    Thanks again for your help.

    gdr
    <IMG SRC=http://www.wopr.com/w3tuserpics/gdrezek_sig.jpg>
    "Those who dance are considered insane by those who can't hear the music" - George Carlin

Posting Permissions

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