Report problem, see script & description of problem below, please. The problem seems to be with the txtTitle field.
Is there any way to have a visible=false not allow for the space to print the field.
The problem occurs in the GroupHeader0 section. Even though I put txtTitle.visible=False, it still makes room for the txtTitle on the report, thus creating a double space, which creates a problem on the report. My GroupHeader prints, double space occurs,followed by the single spaced detail lines associated with the GroupHeader. After the GroupHeader prints, I just need all the detail lines to print, no double space between the GroupHeader and the detail lines. After all the detail lines print, a single space occurs then another GroupHeader prints, followed by a double space, then the detail lines, etc.
Script Follows:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If txtBoldName = 0 Then 'If Bold is no
txtDetailTitle.Visible = True
txtTitle.FontBold = 0
txtDetailLocation.Visible = True
txtDetailLocation.FontBold = 0
txtDetailPhone.Visible = True
txtDetail.Visible = True
Else
txtDetailTitle.Visible = False 'If Bold is Yes
txtTitle.FontBold = 0
txtDetailLocation.Visible = False
txtDetailLocation.FontBold = 0
txtDetailPhone.Visible = False
txtDetail.Visible = False
End If
End Sub
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
'If Bold Name is true, print some fields in BOLD
'If Commissioner title, do not print since it's printed in the Report Header
If txtBoldName = -1 And txtTitle <> "Commissioner" Then
txtTitle.FontBold = 1
txtCommissionerHeader.FontBold = 1
txtCommissionerHeader.Visible = True
txtTitle.Visible = True
txtLocation.FontBold = 1
txtLocation.Visible = True
txtPhone.Visible = True
'Chr (13) & Chr(10)
'Chr (13) & Chr(10)
'Chr (13) & Chr(10)
Else
txtTitle.FontBold = 0
txtCommissionerHeader.FontBold = 0
txtCommissionerHeader.Visible = False
txtTitle.Visible = False
txtLocation.FontBold = 0
txtLocation.Visible = False
txtPhone.Visible = False
End If
End Sub
Is there any way to have a visible=false not allow for the space to print the field.
The problem occurs in the GroupHeader0 section. Even though I put txtTitle.visible=False, it still makes room for the txtTitle on the report, thus creating a double space, which creates a problem on the report. My GroupHeader prints, double space occurs,followed by the single spaced detail lines associated with the GroupHeader. After the GroupHeader prints, I just need all the detail lines to print, no double space between the GroupHeader and the detail lines. After all the detail lines print, a single space occurs then another GroupHeader prints, followed by a double space, then the detail lines, etc.
Script Follows:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If txtBoldName = 0 Then 'If Bold is no
txtDetailTitle.Visible = True
txtTitle.FontBold = 0
txtDetailLocation.Visible = True
txtDetailLocation.FontBold = 0
txtDetailPhone.Visible = True
txtDetail.Visible = True
Else
txtDetailTitle.Visible = False 'If Bold is Yes
txtTitle.FontBold = 0
txtDetailLocation.Visible = False
txtDetailLocation.FontBold = 0
txtDetailPhone.Visible = False
txtDetail.Visible = False
End If
End Sub
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
'If Bold Name is true, print some fields in BOLD
'If Commissioner title, do not print since it's printed in the Report Header
If txtBoldName = -1 And txtTitle <> "Commissioner" Then
txtTitle.FontBold = 1
txtCommissionerHeader.FontBold = 1
txtCommissionerHeader.Visible = True
txtTitle.Visible = True
txtLocation.FontBold = 1
txtLocation.Visible = True
txtPhone.Visible = True
'Chr (13) & Chr(10)
'Chr (13) & Chr(10)
'Chr (13) & Chr(10)
Else
txtTitle.FontBold = 0
txtCommissionerHeader.FontBold = 0
txtCommissionerHeader.Visible = False
txtTitle.Visible = False
txtLocation.FontBold = 0
txtLocation.Visible = False
txtPhone.Visible = False
End If
End Sub