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
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