1) Remove the print button from the top form
- at that point you have no FP DBRW results
2) Your button should be in the last row of the table (after the DBRW) as a separate form
<td colspan="3">
<%
Dim rCount
On Error Resume Next
rCount=fp_rs.RecordCount
If rCount > 20 Then
%>
<form><input type="button" value="Printable Version" name="Print_Button" id="Print_Button"
onclick="window.open('
http://iticentral/rms/Software_Installation_Counts_For_Printing.asp?Software_Name_Input=<%=Request("Software_Name_Input")%>')"
tabindex="1"></form>
<%End If %>
</td></tr>
PS
The space bar is not a design tool
-
--
_____________________________________________
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
_____________________________________________
|I found where to put the code, but it shows a button for each item on
| the page. What I really want to do is check to check the record count.
| If it is less than 20, hide the Print_Button else show the
| Print_Button. Here is my current code but I have not been able to
| figure out how to show/hide the button in the ASP.
|
| <html>
|
| <head>
| <meta http-equiv="Content-Type" content="text/html;
| charset=windows-1252">
| <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
| <meta name="ProgId" content="FrontPage.Editor.Document">
| <title>Software Installation Counts</title>
| <meta name="Microsoft Theme" content="none, default">
| </head>
|
| <body>
|
| <p align="left"><font face="Arial Black" color="#008080"><a
| href="pcaudit_reports.htm">Return to Report
| Menu</a> </font><font
| size="2"> </font> <font
| size="2">Date: <script language="VBScript">
| document.write(FormatDateTime(Date(),0))</script>
|
| Time: <script language="VBScript">
| document.write(FormatDateTime(Time(),0))</script>
| </font></p>
| <p align="center"><font size="7" face="Comic Sans MS"
| color="#FF0066"><i><b><u>Software
| Installation Counts</u></b></i></font></p>
| <form botid="0" method="POST"
| action="Software_Installation_Counts_Test.asp"
| name="FormName">
| <table border="0" width="675">
| <tr>
| <td width="103"><b>Software Name</b></td>
| <td width="148"><input name="Software_Name_Input"
| value="<%=Request("Software_Name_Input")%>" size="20"
| tabindex="1"></td>
| <td width="404"></td>
| </tr>
| </table>
| <br>
| <input type="submit" tabindex="2"> <input type="reset"
|
tabindex="3">
| <font color="#FF0000"><input type="button" value="Printable Version"
| name="Print_Button" id="Print_Button"
|
|
onclick="window.open('
http://iticentral/rms/Software_Installation_Counts_For_Printing.asp?Software_Name_Input=<%=Request("Software_Name_Input")%>')"
| tabindex="4"></font><!--webbot bot="SaveAsASP" clientside
| suggestedext="asp"
| preview=" " -->
| </form>
| <table width="650" border="1">
| <thead>
| <tr>
| <td width="282" bgcolor="#C0C0C0" bordercolor="#000000"
| bordercolorlight="#000000" bordercolordark="#000000"><b>Software
| Name</b></td>
| <td width="187" bgcolor="#C0C0C0" bordercolor="#000000"
| bordercolorlight="#000000" bordercolordark="#000000"
| align="center"><b>Version</b></td>
| <td align="center" width="40" bgcolor="#C0C0C0"
| bordercolor="#000000"
| bordercolorlight="#000000"
| bordercolordark="#000000"><b>Count</b></td>
| </tr>
| </thead>
| <tbody>
| <!--webbot bot="DatabaseRegionStart" startspan
| s-columnnames="Software_Name,Version,CountOfVersion"
| s-columntypes="200,200,3" s-dataconnection="PCAudit"
| b-tableformat="TRUE"
| b-menuformat="FALSE" s-menuchoice="Software_Name"
| s-menuvalue="Software_Name" b-tableborder="TRUE"
| b-tableexpand="TRUE"
| b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
| i-listformat="0" b-makeform="TRUE"
| s-recordsource="Software_Installation_Count"
| s-displaycolumns="Software_Name,Version,CountOfVersion"
| s-criteria="[Software_Name] CNT {Software_Name_Input} +"
| s-order="[Software_Name] + [Version] +"
| s-sql="SELECT * FROM Software_Installation_Count WHERE
| (Software_Name LIKE '%::Software_Name_Input::%') ORDER BY Software_Name
| ASC,Version ASC"
| b-procedure="FALSE" clientside suggestedext="asp"
| s-defaultfields="Software_Name_Input="
| s-norecordsfound="No records returned." i-maxrecords="0"
| i-groupsize="20"
| botid="0" u-dblib="_fpclass/fpdblib.inc"
| u-dbrgn1="_fpclass/fpdbrgn1.inc"
| u-dbrgn2="_fpclass/fpdbrgn2.inc" tag="TBODY"
| local_preview="<tr><td colspan=64
| bgcolor="#FFFF00" align="left"
| width="100%"><font
| color="#000000">Database Results regions will not preview
| unless this page is fetched from a Web server with a web browser. The
| following table row will repeat once for every record returned by the
| query.</font></td></tr>"
| preview="<tr><td colspan=64 bgcolor="#FFFF00"
| align="left" width="100%"><font
| color="#000000">This is the start of a Database Results
| region. The page must be fetched from a web server with a web browser
| to display correctly; the current web is stored on your local disk or
| network.</font></td></tr>"
| b-wastableformat="TRUE" --><!--#include
| file="_fpclass/fpdblib.inc"-->
| <%
| fp_sQry="SELECT * FROM Software_Installation_Count WHERE (Software_Name
| LIKE '%::Software_Name_Input::%') ORDER BY Software_Name ASC,Version
| ASC"
| fp_sDefault="Software_Name_Input="
| fp_sNoRecords="<tr><td colspan=3 align=left width=""100%"">No records
| returned.</td></tr>"
| fp_sDataConn="PCAudit"
| fp_iMaxRecords=0
| fp_iCommandType=1
| fp_iPageSize=20
| fp_fTableFormat=True
| fp_fMenuFormat=False
| fp_sMenuChoice="Software_Name"
| fp_sMenuValue="Software_Name"
| fp_iDisplayCols=3
| fp_fCustomQuery=False
| BOTID=0
| fp_iRegion=BOTID
| %>
| <!--#include file="_fpclass/fpdbrgn1.inc"-->
| <!--webbot bot="DatabaseRegionStart" i-checksum="19791" endspan -->
| <%
| Dim rCount
| On Error Resume Next
| rCount=fp_rs.RecordCount
| If rCount > 20 Then
| Response.Write("<input type=""button"" text=""Click Me"">")
| End If
| %>
| <tr>
| <td width="282" bordercolor="#000000" bordercolorlight="#000000"
| bordercolordark="#000000"><!--webbot bot="DatabaseResultColumn"
| startspan
| s-columnnames="Software_Name,Version,CountOfVersion"
| s-column="Software_Name" b-tableformat="TRUE" b-hashtml="FALSE"
| clientside
| local_preview="<font
| size="-1">&lt;&lt;</font>Software_Name<font
| size="-1">&gt;&gt;</font>"
| preview="<font
| size="-1">&lt;&lt;</font>Software_Name<font
| size="-1">&gt;&gt;</font>"
| --><%=FP_FieldVal(fp_rs,"Software_Name")%><!--webbot
| bot="DatabaseResultColumn" i-checksum="32166" endspan --></td>
| <td width="187" bordercolor="#000000" bordercolorlight="#000000"
| bordercolordark="#000000" align="center"><!--webbot
| bot="DatabaseResultColumn" startspan
| s-columnnames="Software_Name,Version,CountOfVersion"
| s-column="Version"
| b-tableformat="TRUE" b-hashtml="FALSE" clientside
| local_preview="<font
| size="-1">&lt;&lt;</font>Version<font
| size="-1">&gt;&gt;</font>"
| preview="<font
| size="-1">&lt;&lt;</font>Version<font
| size="-1">&gt;&gt;</font>"
| --><%=FP_FieldVal(fp_rs,"Version")%><!--webbot
| bot="DatabaseResultColumn" i-checksum="13495" endspan --></td>
| <td align="center" width="40" bordercolor="#000000"
| bordercolorlight="#000000" bordercolordark="#000000"><!--webbot
| bot="DatabaseResultColumn" startspan
| s-columnnames="Software_Name,Version,CountOfVersion"
| s-column="CountOfVersion" b-tableformat="TRUE"
| b-hashtml="FALSE"
| clientside
| local_preview="<font
| size="-1">&lt;&lt;</font>CountOfVersion<font
| size="-1">&gt;&gt;</font>"
| preview="<font
| size="-1">&lt;&lt;</font>CountOfVersion<font
| size="-1">&gt;&gt;</font>"
| --><%=FP_FieldVal(fp_rs,"CountOfVersion")%><!--webbot
| bot="DatabaseResultColumn" i-checksum="42319" endspan --></td>
| </tr>
| <!--webbot bot="DatabaseRegionEnd" startspan b-tableformat="TRUE"
| b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc"
| i-groupsize="20"
| clientside tag="TBODY"
| local_preview="<tr><td colspan=64
| bgcolor="#FFFF00" align="left"
| width="100%"><font color="#000000">This is
| the end of a Database Results
| region.</font></td></tr><TR><TD ALIGN=LEFT
| VALIGN=MIDDLE COLSPAN=64><FORM><NOBR><INPUT
| TYPE=Button VALUE=" |< "><INPUT TYPE=Button
| VALUE=" < "><INPUT TYPE=Button VALUE=" >
| "><INPUT TYPE=Button VALUE=" >| ">
| [1/20]</NOBR></FORM></td></tr>"
| preview="<tr><td colspan=64 bgcolor="#FFFF00"
| align="left" width="100%"><font
| color="#000000">This is the end of a Database Results
| region.</font></td></tr><TR><TD ALIGN=LEFT
| VALIGN=MIDDLE COLSPAN=64><NOBR><INPUT TYPE=Button
| VALUE=" |< "><INPUT TYPE=Button VALUE="
| < "><INPUT TYPE=Button VALUE=" >
| "><INPUT TYPE=Button VALUE=" >| ">
| [1/20]</NOBR><BR></td></tr>" --><!--#include
| file="_fpclass/fpdbrgn2.inc"-->
| <!--webbot bot="DatabaseRegionEnd" i-checksum="62730" endspan -->
| </tbody>
| <tr>
| <td>
| </table>
|
| </body>
|
| </html>
|