Numeric Formatting

C

Cayvman

I'd like to format the Hours and Total Hours with one decimal place. I'm
including the script for the two queries.
<!--webbot bot="DatabaseRegionStart" s-columnnames="ID,Employee
Name,Hours,Project,Fiscal Year,Period Number,Sub Period Num,WED"
s-columntypes="3,202,5,202,3,3,3,135" s-dataconnection="ProjLab"
b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice="WED"
s-menuvalue="WED" b-tableborder="TRUE" b-tableexpand="TRUE"
b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
i-listformat="0" b-makeform="TRUE" s-recordsource="WPLR"
s-displaycolumns="WED,Project,Employee Name,Hours" s-criteria="[Project] BEG
{Project} + [WED] EQ {WED} +" s-order="[Employee Name] +" s-sql="SELECT *
FROM WPLR WHERE (Project LIKE '::project::%' AND WED = '::WED::') ORDER BY
&quot;Employee Name&quot; ASC" b-procedure="FALSE" clientside
suggestedext="asp" s-defaultfields="Project=&amp;WED=" s-norecordsfound="No
records returned." i-maxrecords="0" i-groupsize="0" botid="0"
u-dblib="../_fpclass/fpdblib.inc" u-dbrgn1="../_fpclass/fpdbrgn1.inc"
u-dbrgn2="../_fpclass/fpdbrgn2.inc" tag="TBODY" preview="<tr><td colspan=64
bgcolor="#FFFF00" width="100%"><font color="#000000">This is the start of a
Database Results region.</font></td></tr>" startspan b-UseDotNET="FALSE"
CurrentExt sa-InputTypes="202,135" b-DataGridFormat="FALSE"
b-DGridAlternate="TRUE" sa-CritTypes="202,135" b-WasTableFormat="TRUE"
--><!--#include file="../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database
Results component on this page is unable to display database content. The
page must have a filename ending in '.asp', and the web must be hosted on a
server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM WPLR WHERE (Project LIKE '::project::%' AND WED =
'::WED::') ORDER BY ""Employee Name"" ASC"
fp_sDefault="Project=&WED="
fp_sNoRecords="<tr><td colspan=4 align=""LEFT"" width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="ProjLab"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="WED"
fp_sMenuValue="WED"
fp_sColTypes="&ID=3&Employee Name=202&Hours=5&Project=202&Fiscal
Year=3&Period Number=3&Sub Period Num=3&WED=135&"
fp_iDisplayCols=4
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="16684" -->

<form method="POST" action="--WEBBOT-SELF--" style="text-align: left">
<!--webbot bot="SaveResults" U-File="../_private/form_results.csv"
S-Format="TEXT/CSV" S-Label-Fields="TRUE" startspan --><input TYPE="hidden"
NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" i-checksum="43374"
endspan -->

<table width="700" border="1">
<thead>
<tr>
<th ALIGN="LEFT">
<p align="right"><b>Total Hours</b></th>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart" s-columnnames="Total
Hours,ID,Employee Name,Hours,Project,Fiscal Year,Period Number,Sub Period
Num,WED" s-columntypes="5,3,202,5,202,3,3,3,135" s-dataconnection="ProjLab"
b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice="Total Hours"
s-menuvalue="Total Hours" b-tableborder="TRUE" b-tableexpand="TRUE"
b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
i-listformat="0" b-makeform="FALSE" s-recordsource s-displaycolumns="Total
Hours" s-criteria s-order s-sql="SELECT *, <br> (SELECT
sum(Hours) FROM WPLR WHERE (Project LIKE '::project::%'AND WED = '::WED::'))
as [Total Hours]<br>FROM WPLR WHERE (Project LIKE '::project::%'AND WED =
'::WED::') ORDER BY Hours ASC<br>" b-procedure="FALSE" clientside
suggestedext="asp" s-defaultfields="Project=&amp;WED=&amp;Project=&amp;WED="
s-norecordsfound="No records returned." i-maxrecords="1" i-groupsize="0"
botid="2" u-dblib="../_fpclass/fpdblib.inc"
u-dbrgn1="../_fpclass/fpdbrgn1.inc" u-dbrgn2="../_fpclass/fpdbrgn2.inc"
tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00" width="100%"><font
color="#000000">This is the start of a Database Results
region.</font></td></tr>" startspan b-InForm="TRUE" b-UseDotNET="FALSE"
CurrentExt sa-InputTypes b-DataGridFormat="FALSE" b-DGridAlternate="TRUE"
sa-CritTypes b-WasTableFormat="TRUE" --><!--#include
file="../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database
Results component on this page is unable to display database content. The
page must have a filename ending in '.asp', and the web must be hosted on a
server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT *, (SELECT sum(Hours) FROM WPLR WHERE
(Project LIKE '::project::%'AND WED = '::WED::')) as [Total Hours] FROM WPLR
WHERE (Project LIKE '::project::%'AND WED = '::WED::') ORDER BY Hours ASC "
fp_sDefault="Project=&WED=&Project=&WED="
fp_sNoRecords="<tr><td colspan=1 align=""LEFT"" width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="ProjLab"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="Total Hours"
fp_sMenuValue="Total Hours"
fp_sColTypes="&Total Hours=5&ID=3&Employee
Name=202&Hours=5&Project=202&Fiscal Year=3&Period Number=3&Sub Period
Num=3&WED=135&"
fp_iDisplayCols=1
fp_fCustomQuery=True
BOTID=2
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="18782" --><tr>
<td>
<p align="right">
<!--webbot bot="DatabaseResultColumn" s-columnnames="Total
Hours,ID,Employee Name,Hours,Project,Fiscal Year,Period Number,Sub Period
Num,WED" s-column="Total Hours" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Total Hours<font size="-1">&gt;&gt;</font>"
startspan s-ColumnTypes="5,3,202,5,202,3,3,3,135"
--><%=FP_FieldVal(fp_rs,"Total Hours")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="32142" --></td>
</tr>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE"
b-menuformat="FALSE" u-dbrgn2="../_fpclass/fpdbrgn2.inc" i-groupsize="0"
clientside tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00"
width="100%"><font color="#000000">This is the end of a Database Results
region.</font></td></tr>" startspan --><!--#include
file="../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="56926" --></tbody>
</table>
</div>
<p> </p>
</form>


Any Help would be greatly appreciated.
 

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