This topic is locked

Show Date Range on Report

5/15/2009 2:25:47 PM
ASPRunnerPro General questions
F
fenhow author

Hi,
Can someone tell me how to or point me in the right direction? I am trying to show the date range selected in the advanced search on the report itself.
example Date of Report 5/1/2009 - 5/15/2009
I found this code but I dont know where to use it.. adn how to add it to the report.
Session("SearchOption_" & strTableName & "DateField") = "Between"

Session("SearchFor1
" & strTableName & "DateField") = ? ( I am not sure what to place here)

Session("SearchFor2
" & strTableName & "_DateField") = ? ( I am not sure what to place here)
Thanks

J
Jane 5/19/2009

Here is a sample:

strSearch=""

if REQUEST("a")="advsearch" then
asearchfield = postvalue("asearchfield[]")
if not isarray(asearchfield) then
dim t
t=asearchfield
redim asearchfield(1)
asearchfield(0)=t
end if
for field=0 to ubound(asearchfield)
gfield=asearchfield(field)
asopt=postvalue("asearchopt" & GoodFieldName(asearchfield(field)))
value1=postvalue("value
" & GoodFieldName(asearchfield(field)))
if value1="" then value1=postvalue("value" & GoodFieldName(asearchfield(field)) & "[]")
ttype=postvalue("type
" & GoodFieldName(asearchfield(field)))
value2=postvalue("value1_" & GoodFieldName(asearchfield(field)))
if value2="" then value2=postvalue("value1" & GoodFieldName(asearchfield(field)) & "[]")
nnot=postvalue("not
" & GoodFieldName(asearchfield(field)))
if nnot="on" then nnot = "not" else nnot="" end if
if not SafeIsEmpty(value1) or asopt="Empty" then
strSearch = strSearch & " " & ttype & " "
strSearch = strSearch & gfield & " " & nnot & " " & asopt & " "
if not isArray(value1) then
strSearch = strSearch & value1
else
strSearch = strSearch & combinevalues(value1)
end if
if not SafeIsEmpty(value2) then strSearch = strSearch & " and " & value2
end if
next
end if
if strSearch<>"" then _
response.write "Search Results Showing " & strSearch

J
joevoirol 6/23/2009

Where would you put this?

J
Jane 6/25/2009

In the List page: Before process event on the Events tab.