Hiding a Line Control

  • Thread starter Thread starter DDJ
  • Start date Start date
D

DDJ

Our report includes a group section which includes both a label and a text
control used to subtotal a field in the Detail section of the report. In
addition, the Group section includes a Line control above the text control
(so it's obvious to the user that this is a total).

On certain types of records run through the Detail section, we don NOT want
a subtotal. Accordingly, we have set the "Can Shrink" property of both the
group section, and the label and text box controls to "Yes". However, the
Line control does not have a "Can Shrink" property, so there is no way to
get rid of the line in the report.

For the most part, we have tried using an Expression in the OnFormat or
OnPrint events for the group section similar to the following:

=IIf([GroupID]=1, GroupFooter2.Visible=False, GroupFooter2.Visible=True)

This expression, or similar ones, seems to always come back with a data type
mismatch error when running. Can anyone see where our problem is?

Thanks for any help!

Dan
 
Mybe, but is the GroupID type is sting or number, because if it string then
it should be like that
put in on the on print event of the section
If(me.[GroupID]="1" then
GroupFooter2.Visible=False
else
GroupFooter2.Visible=True)
endif
 
The GroupID is a number. Still getting a "Type mismatch" error. Is it
possible I'm referring to the footer section improperly?


Ofer said:
Mybe, but is the GroupID type is sting or number, because if it string then
it should be like that
put in on the on print event of the section
If(me.[GroupID]="1" then
GroupFooter2.Visible=False
else
GroupFooter2.Visible=True)
endif

DDJ said:
Our report includes a group section which includes both a label and a text
control used to subtotal a field in the Detail section of the report. In
addition, the Group section includes a Line control above the text control
(so it's obvious to the user that this is a total).

On certain types of records run through the Detail section, we don NOT want
a subtotal. Accordingly, we have set the "Can Shrink" property of both the
group section, and the label and text box controls to "Yes". However, the
Line control does not have a "Can Shrink" property, so there is no way to
get rid of the line in the report.

For the most part, we have tried using an Expression in the OnFormat or
OnPrint events for the group section similar to the following:

=IIf([GroupID]=1, GroupFooter2.Visible=False, GroupFooter2.Visible=True)

This expression, or similar ones, seems to always come back with a data type
mismatch error when running. Can anyone see where our problem is?

Thanks for any help!

Dan
 
Back
Top