dynamically hiding a frame in report

Shil

New Member
I’m having some problems with dynamically hiding a frame. I have an array of Frame controls on the report; every frame in turn contains a fixed number of Text controls (so that the whole structure looks like a table), which are again mapped to different database fields. Now I would like to hide the entire frame if in the frame one of the text controls fetches a null value.

To achieve this I’ve placed the following code in the Finish() method of every Frame control.

Dim itr as AcIterator

Dim iCls as AnyClass

Dim x1 as AcControl

dim flow as Acflow

Set itr=GetContentIterator()

Do While (itr.HasMore())

Set iCls = itr.GetNext()

msgbox(GetClassName(iCls) & "...." &GetControlValue(GetClassName(iCls)))

If instr(GetClassName(iCls),"FEE") Then

If isNull(GetControlValue(GetClassName(iCls))) Then

msgbox("null value... deleting frame")

set flow = GetPagelist().GetCurrentFlow()

flow.Releasespace(GetWidth(), GetHeight())

me.size.height = 0

me.size.width = 0

End If

End If

Loop

Super::Finish( )




Now I’m able to suppress the entire frame when the condition is met, but it leaves an open space on the report. Whereas I want the report look compact, which essentially means that the next visible frame on the report should take up the space left vacant by the previous frame (which I’ve taken off ).
 
Top