×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Dynamic building of frames

Dynamic building of frames

Dynamic building of frames

(OP)
Hello,

I am trying to dynamically build a multi-line address that will show through a plastic window in an envelope.  I don't know if this is the correct way to go about this, but I set up a sequential section and put each line of the address into a separate frame in the sequential section.  Then I wrote the code below to build each frame *only if* there is data for it, but it is still building empty frames (and creating an empty space in my address block) even if there isn't any data for that frame.  Am I going about this the wrong way?

TIA,

Codehead

Function NewContent( index As Integer ) As AcReportComponent
    Dim MyDataRow as APSS::SSDFDataRow
    Dim MySection As AcSection
    static MyIndex as integer
    If index = 1 then
        MyIndex = 1
    end if

    if index = 2 then
        Set MyDataRow = New APSS::SSDFDataRow
        Set MySection = GetContainer()
        Set MyDataRow = MySection.GetCurrentRow()
        If  MyDataRow Is Nothing Then
                MyIndex = 3
        end if
    end if

    if index = 3 then
        Set MyDataRow = New APSS::SSDFDataRow
        Set MySection = GetContainer()
        Set MyDataRow = MySection.GetCurrentRow()
        If  MyDataRow Is Nothing Then
            MyIndex = 4
        end if
    end if

    if index = 4 then
        Set MyDataRow = New APSS::SSDFDataRow
        Set MySection = GetContainer()
        Set MyDataRow = MySection.GetCurrentRow()
        If  MyDataRow Is Nothing Then
            MyIndex = 5
        end if
    end if

    if index = 5 then
        Set MyDataRow = New APSS::SSDFDataRow
        Set MySection = GetContainer()
        Set MyDataRow = MySection.GetCurrentRow()
        If  MyDataRow Is Nothing Then
            MyIndex = 6
        end if
    end if

    if index = 6 then
        Set MyDataRow = New APSS::SSDFDataRow
        Set MySection = GetContainer()
        Set MyDataRow = MySection.GetCurrentRow()
        If  MyDataRow Is Nothing Then
            MyIndex = 7
        end if
    end if

    if MyIndex > 6 then
        exit function
    end if

    Set NewContent = Super::NewContent( MyIndex )

    MyIndex = MyIndex + 1

End Function

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close