qberta01
Programmer
- Nov 14, 2005
- 113
Hello,
I cannot seem to figure this one out. I have several reports that I call through ASP pages. 98% of the reports use some type of date selection formula. To save myself the hassle of rewriting date selection combo boxes for every page, I created an include file. I call this file from my report pages and the dates show just fine. Now what I would like to do is be able to make my selection, click a button, capture the selected values and continue to run code in that very same page.
Some code examples:
This is some of the include file code:
Public Function Select_Date()
Dim dYr
dYr = Year(NOW())
<Select id='BYear' size='1' NAME=BeginYear>
<option value = '<%=dyr%>'><%=dyr%></option>
<option value = '<%=dyr-1%>'><%=dyr-1%></option>
<option value = '<%=dyr-2%>'><%=dyr-2%></option>
</select>
End Function
----------------------------------------
This is some of my report.asp code:
<FORM Name='Report' action='Report.asp' METHOD=POST ID="Form1">
<%response.Write Select_Date()%>
<P class="ReportBody">
<INPUT type='button' value='Run Report' id="Button1" name=submit1>
<br>
<br>
</form>
----------------
The combobox shows fine, but once the Run Report button is clicked I would like to capture the actual date value and use it to execute more code in the Report.asp page.
Any help is greatly appreciated.
Q
I cannot seem to figure this one out. I have several reports that I call through ASP pages. 98% of the reports use some type of date selection formula. To save myself the hassle of rewriting date selection combo boxes for every page, I created an include file. I call this file from my report pages and the dates show just fine. Now what I would like to do is be able to make my selection, click a button, capture the selected values and continue to run code in that very same page.
Some code examples:
This is some of the include file code:
Public Function Select_Date()
Dim dYr
dYr = Year(NOW())
<Select id='BYear' size='1' NAME=BeginYear>
<option value = '<%=dyr%>'><%=dyr%></option>
<option value = '<%=dyr-1%>'><%=dyr-1%></option>
<option value = '<%=dyr-2%>'><%=dyr-2%></option>
</select>
End Function
----------------------------------------
This is some of my report.asp code:
<FORM Name='Report' action='Report.asp' METHOD=POST ID="Form1">
<%response.Write Select_Date()%>
<P class="ReportBody">
<INPUT type='button' value='Run Report' id="Button1" name=submit1>
<br>
<br>
</form>
----------------
The combobox shows fine, but once the Run Report button is clicked I would like to capture the actual date value and use it to execute more code in the Report.asp page.
Any help is greatly appreciated.
Q