Forums
This topic is locked
Show region - suppress BR tag
15 Jan 2002 21:18:21 Carrie K. posted:
This is probably a really simple thing but our programmers can't even seem to tell me how to do it manually... I have 3 data fields with BR tags between them to create a new line. Two of the fields might be empty and if so, I DO NOT want an empty line. I've tried using both the Show Region and the Conditional Region behaviors (applied around the br) and neither one works, I still get an empty space. Any ideas??
Thanks in advance,
cas232
Replies
Replied 15 Jan 2002 22:01:47
15 Jan 2002 22:01:47 Kent Steelman replied:
One method may be to have the record set.... query in the database place as a condictional "N/A" if the field is null. Now that would also be dependant on if the field was non-numeric.
Wm. Kent Steelman
Wm. Kent Steelman
Replied 15 Jan 2002 22:47:26
15 Jan 2002 22:47:26 Carrie K. replied:
That is a great idea, but there is one problem, if I understand you correctly. The fields in question are for a 2nd & 3rd address line (suite # etc) in a list of our office locations. So it would look a little odd to have an N/A in this case....it is a text field however.
Thank you!
Carrie
Thank you!
Carrie
Replied 16 Jan 2002 09:53:29
16 Jan 2002 09:53:29 Viktor Farcic replied:
Use If...Then to show/hide <br>.
Your code now looks like:
<%=(TableName.Fields.Item("Field1".Value)%>
<br><%=(TableName.Fields.Item("Field2".Value)%>
<br><%=(TableName.Fields.Item("Field3".Value)%>
It should look like:
<%=(TableName.Fields.Item("Field1".Value)%>
<% If (TableName.Fields.Item("Field2".Value) <> "" Then %>
<br><%=(TableName.Fields.Item("Field2".Value)%>
<% End If %>
<% If (TableName.Fields.Item("Field3".Value) <> "" Then %>
<br><%=(TableName.Fields.Item("Field3".Value)%>
<% End If %>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
This is probably a really simple thing but our programmers can't even seem to tell me how to do it manually... I have 3 data fields with BR tags between them to create a new line. Two of the fields might be empty and if so, I DO NOT want an empty line.
I've tried using both the Show Region and the Conditional Region behaviors (applied around the br) and neither one works, I still get an empty space. Any ideas??
Thanks in advance,
cas232
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Viktor Farcic
TalkZone Manager
Your code now looks like:
<%=(TableName.Fields.Item("Field1".Value)%>
<br><%=(TableName.Fields.Item("Field2".Value)%>
<br><%=(TableName.Fields.Item("Field3".Value)%>
It should look like:
<%=(TableName.Fields.Item("Field1".Value)%>
<% If (TableName.Fields.Item("Field2".Value) <> "" Then %>
<br><%=(TableName.Fields.Item("Field2".Value)%>
<% End If %>
<% If (TableName.Fields.Item("Field3".Value) <> "" Then %>
<br><%=(TableName.Fields.Item("Field3".Value)%>
<% End If %>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
This is probably a really simple thing but our programmers can't even seem to tell me how to do it manually... I have 3 data fields with BR tags between them to create a new line. Two of the fields might be empty and if so, I DO NOT want an empty line.
I've tried using both the Show Region and the Conditional Region behaviors (applied around the br) and neither one works, I still get an empty space. Any ideas??
Thanks in advance,
cas232
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Viktor Farcic
TalkZone Manager