Espinoza84
Registered User.
- Local time
- Today, 07:14
- Joined
- May 30, 2008
- Messages
- 55
Hello all,
I am making a report, that containts a subreport. I am hiding and showing (visible =false/true) on some textboxes/labels to achieve the display I want.
I have somewhat accomplished this but not exactly.
Let me post my code first:
Option Compare Database
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.FinalRecert_subrep_01.Report.Appnt = "LAN" Then
With Me
.FinalRecert_subrep_01.Report.Text29.Visible = True 'LAN
.FinalRecert_subrep_01.Report.Label30.Visible = True 'LAN
.FinalRecert_subrep_01.Report.Text31.Visible = False 'ECO
.FinalRecert_subrep_01.Report.Label32.Visible = False 'ECO
.FinalRecert_subrep_01.Report.text40.Visible = False 'GP
.FinalRecert_subrep_01.Report.Label33.Visible = False 'GP
End With
Else
If Me.FinalRecert_subrep_01.Report.Appnt = "ECO" Then
With Me
.FinalRecert_subrep_01.Report.Text29.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Label30.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Text31.Visible = True 'ECO
.FinalRecert_subrep_01.Report.Label32.Visible = True 'ECO
.FinalRecert_subrep_01.Report.text40.Visible = False 'GP
.FinalRecert_subrep_01.Report.Label33.Visible = False 'GP
End With
Else
If Me.FinalRecert_subrep_01.Report.Appnt = "Dynamics Great Plains" Then
With Me
.FinalRecert_subrep_01.Report.Text29.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Label30.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Text31.Visible = False 'ECO
.FinalRecert_subrep_01.Report.Label32.Visible = False 'ECO
.FinalRecert_subrep_01.Report.text40.Visible = True 'GP
.FinalRecert_subrep_01.Report.Label33.Visible = True 'GP
End With
Else
If Me.FinalRecert_subrep_01.Report.Appnt = "Hyperion Enterprise" Then
With Me
.FinalRecert_subrep_01.Report.Text29.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Label30.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Text31.Visible = False 'ECO
.FinalRecert_subrep_01.Report.Label32.Visible = False 'ECO
.FinalRecert_subrep_01.Report.text40.Visible = False 'GP
.FinalRecert_subrep_01.Report.Label33.Visible = False 'GP
End With
Else
If Me.FinalRecert_subrep_01.Report.Appnt = "Journals Access Folder" Then
With Me
.FinalRecert_subrep_01.Report.Text29.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Label30.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Text31.Visible = False 'ECO
.FinalRecert_subrep_01.Report.Label32.Visible = False 'ECO
.FinalRecert_subrep_01.Report.text40.Visible = False 'GP
.FinalRecert_subrep_01.Report.Label33.Visible = False 'GP
End With
Else
With Me
.FinalRecert_subrep_01.Report.Text29.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Label30.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Text31.Visible = False 'ECO
.FinalRecert_subrep_01.Report.Label32.Visible = False 'ECO
.FinalRecert_subrep_01.Report.text40.Visible = False 'GP
.FinalRecert_subrep_01.Report.Label33.Visible = False 'GP
End With
End If
End If
End If
End If
End If
End Sub
-------------------------------------------------
The code runs with no errors. The problem is that because I have my subreport in the detail section of my MAIN report, I am expecting some 'users' (people) to have multiple Appnt's; 'APPNT' is short for APPLICATION (applications: LAN, ECO, Hyperion E, etc). At the moment my code looks at the person and his first "appnt" (application) and it will display the visible code for the first "APPNT", then once the next "APPNT" (sport: golf, tennis etc) appears it will display the information of the first "APPNT" it had. so to illustrate:
James martin
APPNT: LAN LANID: Test1
APPNT: ECO LANID:
JOSE CUERVO
APPNT: ECO ECOID: Hello1
APPNT: Hyperion Enterprise ECOID:
THe errors are highlighted in green. For james martin once the APPNT: ECO appears it should pull his "ECOID" not repeat LANID, same with jose cuervo, because appnt= hyperion enterprise there should be no id at all, since all the visibles=false for that appnt.
Any idea what I am doing wrong?
I am attaching a screenshot of my design setup.
I am making a report, that containts a subreport. I am hiding and showing (visible =false/true) on some textboxes/labels to achieve the display I want.
I have somewhat accomplished this but not exactly.
Let me post my code first:
Option Compare Database
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.FinalRecert_subrep_01.Report.Appnt = "LAN" Then
With Me
.FinalRecert_subrep_01.Report.Text29.Visible = True 'LAN
.FinalRecert_subrep_01.Report.Label30.Visible = True 'LAN
.FinalRecert_subrep_01.Report.Text31.Visible = False 'ECO
.FinalRecert_subrep_01.Report.Label32.Visible = False 'ECO
.FinalRecert_subrep_01.Report.text40.Visible = False 'GP
.FinalRecert_subrep_01.Report.Label33.Visible = False 'GP
End With
Else
If Me.FinalRecert_subrep_01.Report.Appnt = "ECO" Then
With Me
.FinalRecert_subrep_01.Report.Text29.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Label30.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Text31.Visible = True 'ECO
.FinalRecert_subrep_01.Report.Label32.Visible = True 'ECO
.FinalRecert_subrep_01.Report.text40.Visible = False 'GP
.FinalRecert_subrep_01.Report.Label33.Visible = False 'GP
End With
Else
If Me.FinalRecert_subrep_01.Report.Appnt = "Dynamics Great Plains" Then
With Me
.FinalRecert_subrep_01.Report.Text29.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Label30.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Text31.Visible = False 'ECO
.FinalRecert_subrep_01.Report.Label32.Visible = False 'ECO
.FinalRecert_subrep_01.Report.text40.Visible = True 'GP
.FinalRecert_subrep_01.Report.Label33.Visible = True 'GP
End With
Else
If Me.FinalRecert_subrep_01.Report.Appnt = "Hyperion Enterprise" Then
With Me
.FinalRecert_subrep_01.Report.Text29.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Label30.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Text31.Visible = False 'ECO
.FinalRecert_subrep_01.Report.Label32.Visible = False 'ECO
.FinalRecert_subrep_01.Report.text40.Visible = False 'GP
.FinalRecert_subrep_01.Report.Label33.Visible = False 'GP
End With
Else
If Me.FinalRecert_subrep_01.Report.Appnt = "Journals Access Folder" Then
With Me
.FinalRecert_subrep_01.Report.Text29.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Label30.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Text31.Visible = False 'ECO
.FinalRecert_subrep_01.Report.Label32.Visible = False 'ECO
.FinalRecert_subrep_01.Report.text40.Visible = False 'GP
.FinalRecert_subrep_01.Report.Label33.Visible = False 'GP
End With
Else
With Me
.FinalRecert_subrep_01.Report.Text29.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Label30.Visible = False 'LAN
.FinalRecert_subrep_01.Report.Text31.Visible = False 'ECO
.FinalRecert_subrep_01.Report.Label32.Visible = False 'ECO
.FinalRecert_subrep_01.Report.text40.Visible = False 'GP
.FinalRecert_subrep_01.Report.Label33.Visible = False 'GP
End With
End If
End If
End If
End If
End If
End Sub
-------------------------------------------------
The code runs with no errors. The problem is that because I have my subreport in the detail section of my MAIN report, I am expecting some 'users' (people) to have multiple Appnt's; 'APPNT' is short for APPLICATION (applications: LAN, ECO, Hyperion E, etc). At the moment my code looks at the person and his first "appnt" (application) and it will display the visible code for the first "APPNT", then once the next "APPNT" (sport: golf, tennis etc) appears it will display the information of the first "APPNT" it had. so to illustrate:
James martin
APPNT: LAN LANID: Test1
APPNT: ECO LANID:
JOSE CUERVO
APPNT: ECO ECOID: Hello1
APPNT: Hyperion Enterprise ECOID:
THe errors are highlighted in green. For james martin once the APPNT: ECO appears it should pull his "ECOID" not repeat LANID, same with jose cuervo, because appnt= hyperion enterprise there should be no id at all, since all the visibles=false for that appnt.
Any idea what I am doing wrong?
I am attaching a screenshot of my design setup.