This topic is locked

Initial view

10/21/2004 12:44:31 PM
ASPRunnerPro General questions
author

I have a database which has data from 2000-2004, where the years run like
2001-2001

2001-2002

ETC ETC

2004-2005
I want to force the initial view to only the current year of 2004-2005 something like
Initial view = 2004-2005
The only way I can think of is to use SQL but then stops the other data from being displayed.
HELP !!!!

Admin 10/25/2004

Here is how you can do this:

  • Build ASP pages with ASPRunner using No records on the first page option
  • Modify generated ..._list.asp code (see my changes in bold):
    if InStr(strSQL, " where ") > 0 then sWhere = " and (" & Mid(sWhere, 8) & " ) "

    strSQL = strSQL & sWhere

    end if
    if Request.Form("action")="" then

      strSQL = strSQL & " where 1=0"

    end if
    strSQL = strSQL & " " & Trim(strOrderBy)

    end if


Replace 1=0 with your own condition ( year >=2004 and year<=2005 )