Suppress blank DRW field

G

Guest

A field in my DRW section may not contain a value for some records. Is there
a way to suppress the resulting blank line so the field under it will "move
up"?
 
S

Stefan B Rusynko

Set the criteria of the DBRW to not include empty records (<>"" or not null depending on your data structure)

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|A field in my DRW section may not contain a value for some records. Is there
| a way to suppress the resulting blank line so the field under it will "move
| up"?
 
K

Kathleen Anderson [MVP - FrontPage]

Wrap the field in some script that checks to see if it's empty; here's an
example:


<% If fp_rs("Municipality") > " " then %>


<li><b>Municipality:</b> ­<!--webbot bot="DatabaseResultColumn"
startspan


s-columnnames="ProgramArea,Rec­ordNum,Date,ItemNumber,SplitIt­em,Session,PA­_SA
,ActNumber,Section,Recipient,M­unicipality,FundsUse,DollarFie­ld1,DollarFie­ld2
,DollarField3,DollarField4,Any­_Previous,DollarField5,FundNum­,AgencyNum,SI­D,P
roject_Num,Description"
s-column="Municipality" b-tableformat="FALSE" b-hashtml="FALSE"
clientside
preview="<font
size="-1">&lt­;&lt;</font>Municipa­lity<font
size="-1">&gt­;&gt;</font>" b-makelink
b-MenuFormat --><%=FP_FieldVal(fp_rs,"Munic­ipality")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="33247" --></li>


<% End If %>

--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/


Trillian said:
I only want to suppress the blank field and its "line", not the entire
record.


Stefan B Rusynko said:
Set the criteria of the DBRW to not include empty records (<>"" or not
null depending on your data structure)

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|A field in my DRW section may not contain a value for some records. Is
there
| a way to suppress the resulting blank line so the field under it will
"move
| up"?
 
G

Guest

Thanks, Kathleen, that was the answer.

(I had tried an if statement using the FieldVal version of the field which
never recognised null or blank.)

Kathleen Anderson said:
Wrap the field in some script that checks to see if it's empty; here's an
example:


<% If fp_rs("Municipality") > " " then %>


<li><b>Municipality:</b> ­<!--webbot bot="DatabaseResultColumn"
startspan


s-columnnames="ProgramArea,Rec­ordNum,Date,ItemNumber,SplitIt­em,Session,PA­_SA
,ActNumber,Section,Recipient,M­unicipality,FundsUse,DollarFie­ld1,DollarFie­ld2
,DollarField3,DollarField4,Any­_Previous,DollarField5,FundNum­,AgencyNum,SI­D,P
roject_Num,Description"
s-column="Municipality" b-tableformat="FALSE" b-hashtml="FALSE"
clientside
preview="<font
size="-1">&lt­;<</font>Municipa­lity<font
size="-1">&gt­;></font>" b-makelink
b-MenuFormat --><%=FP_FieldVal(fp_rs,"Munic­ipality")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="33247" --></li>


<% End If %>

--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/


Trillian said:
I only want to suppress the blank field and its "line", not the entire
record.


Stefan B Rusynko said:
Set the criteria of the DBRW to not include empty records (<>"" or not
null depending on your data structure)

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|A field in my DRW section may not contain a value for some records. Is
there
| a way to suppress the resulting blank line so the field under it will
"move
| up"?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top