This topic is locked

Report Filter

8/2/2008 7:09:22 AM
ASPRunnerPro General questions
S
sfhussain author

Hi,
I need to know that how can i make a filter in my Report. I have field of Date by which i fetch my report, Due to too many record i want to use a drop down filter so i can fetch report date wise.
Is there any way to put a drop down filter so i can direct goto to report of desired date. so dont need to use Advance Search.
TableName: south

Field Name: actdate
Screenshot for reference:

J
Jane 8/4/2008

Hi,
you can create this dropdown manually using custom events (as you've done on the list page) or use advanced search.

S
sfhussain author 8/4/2008

Hi,

you can create this dropdown manually using custom events (as you've done on the list page) or use advanced search.



HI jane,
Thanks for the support, but drop down in my list page doesnt work, as i upload the project on Demo account also but didnt get any activation email. So i am unable to do further things.

S
sfhussain author 8/4/2008

Hi,

you can create this dropdown manually using custom events (as you've done on the list page) or use advanced search.



Hi Jane,
I am attaching my code, kindly check is this correct for Report or is there some changes in it.
I have to filter it by:

FieldName = ticket_date

TableName = south

str = ""

str = "<select onChange=""java script: document.location='south_Report_report.asp?a=search&value=1&SearchOption=Contains&SearchField=ticket_date&SearchFor='+this.options[this.selectedIndex].value;"">"

str = str & "<option value="">Please select</option>"
strSQL = "select ticket_date from south"

Set rstmp = server.CreateObject("ADODB.Recordset")

rstmp.open strSQL,dbConnection
while not rstmp.eof

str = str & "<option value=""" & rstmp("ticket_date") & """>" & rstmp("ticket_date") & "</option>"

rstmp.MoveNext

wend
rstmp.close

set rstmp=nothing
str = str & "</select>"

Response.write str


Filter dropdown is appeared by its not working. I can see all records as i can see them before the drop down. No filter working.

J
Jane 8/4/2008

Hi,
your code looks correct.

Only one point: there is no simple search for the reports. Use advanced search URL instead.

To get the URL of advanced search results page check following thread:

http://www.asprunner.com/forums/index.php?showtopic=5705