Results 1 to 4 of 4
  1. #1
    Join Date
    May 2002
    Posts
    157

    Unanswered: Report - hiding field when count value = 0

    Hi all,
    I have a report (usysbFormServiceSumR) which has details and count totals on it.

    In the GroupFooter2 (which has a title of IndvdlServiceProvided) are 6 text fields.

    They are called:
    LabelIndvdlGroupW1 IndvdlGroupWProvided CountGW1
    LabelIndvdlServP1 IndvdlServP1 CountINDV1

    The CountGW1 and CountINDV1 fields have formulas which count the number of records for a particular group

    Please see ATTACHED two .jpg screen dumps to help you understand what I am doing.

    I would like to hide the following 3 fields only when the CountGW1 = 0
    LabelIndvdlGroupW1 IndvdlGroupWProvided CountGW1

    I would like to hide the following 3 fields only when the CountINDV1 = 0
    LabelIndvdlServP1 IndvdlServP1 CountINDV1


    Can this be done? If yes, then can you help me with the appropriate code as I have been trying a few things out and nothing seems to work.

    Thank you in advance.

    KD
    Attached Thumbnails Attached Thumbnails ServiceSummaryScreenDump.JPG   ServiceSummary2ScreenDump.JPG  

  2. #2
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    I would like to hide the following 3 fields only when the CountGW1 = 0
    LabelIndvdlGroupW1 IndvdlGroupWProvided CountGW1

    I would like to hide the following 3 fields only when the CountINDV1 = 0
    LabelIndvdlServP1 IndvdlServP1 CountINDV1
    In the GroupFooter2 section, create an OnPrint event. Simply say as follows:
    Code:
    If CountGW1 = 0 Then
        Me.LabelIndvdlGroupW1.Visible=False
        Me.IndvdlGroupWProvided.Visible=False
        Me.CountGW1.Visible=False
    Else
        Me.LabelIndvdlGroupW1.Visible=True
        Me.IndvdlGroupWProvided.Visible=True
        Me.CountGW1.Visible=True
    End If
    Use the same logic for the other criterion.

    SL

  3. #3
    Join Date
    May 2002
    Posts
    157

    Thanks heaps it works perfectly

    Thank you so much for this it works perfectly

  4. #4
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    You're welcome.

Posting Permissions

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