Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2001
    Posts
    175

    Question Unanswered: Shrinking labels in reports

    How can you shrink a label on a report?

    My row on the report consist of a control field with a label and a text box. Although I have my control field and text set to 'can shrink', I want if the value of the control field is 0, to shrink the row so that the other fields underneath move up?

    Any suggestions?

  2. #2
    Join Date
    Oct 2001
    Location
    Bay Area, CA
    Posts
    117
    Can you filter out the records you don't want in the underlying query?

  3. #3
    Join Date
    Sep 2001
    Posts
    175
    How do I go about that......

    My form consist of various charges e.g.
    Charge1 = $200.00
    Charge2 = $0.00
    Charge3 = $50.00

    My report has the following:
    Label Control Field Text Box
    Charge1 $200.00 $200.00
    Charge2 $0.00 $0.00
    Charge3 $50.00 $50.00

    On my report I want the shrink the Charge2 row so that Charge3 moves under Charge1

    Please Help!!!!!

  4. #4
    Join Date
    Oct 2001
    Location
    Bay Area, CA
    Posts
    117
    change your undelying query to:

    SELECT Charge FROM tblCharges WHERE Charge <> 0;

    Hope this helps....

  5. #5
    Join Date
    Sep 2001
    Posts
    175
    When I changed the underlying query to where charge <> 0 the entire record does not show. I just want the field that is 0 not to show.

  6. #6
    Join Date
    Nov 2001
    Posts
    336
    You may use report events to handle such things.
    For example, put the following code in print event of the detail section of your report:

    Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
    If Me.txtCharge1 = 0 Then
    Me.txtCharge1.Visible = False
    Else
    Me.txtCharge1.Visible = True
    End If

    If Me.txtCharge2 = 0 Then
    Me.txtCharge2.Visible = False
    Else
    Me.txtCharge2.Visible = True
    End If
    End Sub

    Note: txtCharge1 and txtCharge2 are names of textboxes on your report. Change them accordingly your naming convention.

    HTH

  7. #7
    Join Date
    Oct 2001
    Location
    Bay Area, CA
    Posts
    117
    My suggestion should work. Test it in your query builder first before you use it in your report.

  8. #8
    Join Date
    Sep 2001
    Posts
    175

    Talking

    Thanks for all who rendered assistance. I am finally getting the info correctly on the report thanks to IGelin's suggestion.

    Thanks again!!!

Posting Permissions

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