Visibility dependant on data in a different group

MaliciousMike

Registered User.
Local time
Today, 17:42
Joined
May 24, 2006
Messages
118
Hello.

I have a report which shows Company's percentages and their regional percentages.

Everything below 70% must show, but everything 70 or above musn't show. The visibility is based on region name. So for example, if "Company A" was 85%, but one of the regions was only 65%, then Company A would still show, but only that region would show for it.

Company A 75%
Region A 70%
Region B 90%
Region C 100%
Region D 65%

my code in the report goes through each region and displays itself if it's below 70%.

Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As Integer)

Code:
If txtPercentage >= 0.7 Then
    txtcompanyname.Visible = False
    TxtRegionName.Visible = False
    txtPercentage.Visible = False
    lblAM.Visible = False
    lblPM.Visible = False
    lblEVE.Visible = False
    lbl4th.Visible = False
    Text32.Visible = False
Else
    txtcompanyname.Visible = True
    TxtRegionName.Visible = True
    txtPercentage.Visible = True
    lblAM.Visible = True
    lblPM.Visible = True
    lblEVE.Visible = True
    lbl4th.Visible = True
    Text32.Visible = True
End If
   
End Sub

This works fine for the regions, but what i've discovered is that if the last region is above 70% then the company name is hidden.

Can anyone think of a solution to this.
Please not that all my mathematics and grouping must be done in the report.


PS SORRY FOR DOUBLE POST... THE SITE'S SLOW... so i clicked it more than once...
 
Last edited:
no one has ever come across this issue?
i thought it would be quite a common dilemma.
 
If this is in-solve-able, then please let me know.

I'm struggling to find an alternative.
I don't know what words to use when searching in google groups.
 

Users who are viewing this thread

Back
Top Bottom