%@Language=VBScript%> <% Response.Expires = 0 Response.Buffer = TRUE %>
This example filters a schedule and displays the filtered schedule in the browser.
<%
If Len(Request.Form("FormAction")) = 0 Then
' Show the initial schedule
set oMiles=GetObject("c:\miles2000\waterfall.ml6","Milestones")
oMiles.Activate
oMiles.Refresh
oMiles.SaveBitmap ("http://www.kidasa.com\information\programmers\asp\images\savefromvbscript.jpg")
oMiles.Close "NoSave"
%>
Select a filter option from below:
<% Response.Write "" ElseIf Request.Form("FormAction") = "ShowAllTaskLines" Then ' Set filtering options and resave jpeg file set oMiles=GetObject("c:\miles2000\waterfall.ml6","Milestones") Randomize ImageName = "filtout"+CStr(Rnd)+".jpg" FullPathImageName = "http://www.kidasa.com\information\programmers\asp\images\"+ImageName WWWPathImageName = "/information/programmers/asp/images/"+ImageName oMiles.Activate oMiles.Refresh oMiles.SaveBitmap (FullPathImageName) oMiles.Close "NoSave" Response.Write "" ElseIf Request.Form("FormAction") = "ShowLevelOneLines" Then ' Set filtering options and resave jpeg file set oMiles=GetObject("c:\miles2000\waterfall.ml6","Milestones") Randomize ImageName = "filtout"+CStr(Rnd)+".jpg" FullPathImageName = "http://www.kidasa.com\information\programmers\asp\images\"+ImageName WWWPathImageName = "/information/programmers/asp/images/"+ImageName oMiles.Activate oMiles.Refresh oMiles.RollUpTaskLines "1" oMiles.SaveBitmap (FullPathImageName) oMiles.Close "NoSave" Response.Write "" ElseIf Request.Form("FormAction") = "ShowLevelOneTwoLines" Then ' Set filtering options and resave jpeg file set oMiles=GetObject("c:\miles2000\waterfall.ml6","Milestones") Randomize ImageName = "filtout"+CStr(Rnd)+".jpg" FullPathImageName = "http://www.kidasa.com\information\programmers\asp\images\"+ImageName WWWPathImageName = "/information/programmers/asp/images/"+ImageName oMiles.Activate oMiles.Refresh oMiles.RollUpTaskLines "2" oMiles.SaveBitmap (FullPathImageName) oMiles.Close "NoSave" Response.Write "" ElseIf Request.Form("FormAction") = "ShowFilteredLines" Then ' Set filtering options and resave jpeg file Dim txtString1 Dim txtString2 txtString1 = Request.Form("txtString1") txtString2 = Request.Form("txtString2") BoolType = Request.Form("BOOLOP") set oMiles=GetObject("c:\miles2000\waterfall.ml6","Milestones") Randomize ImageName = "filtout"+CStr(Rnd)+".jpg" FullPathImageName = "http://www.kidasa.com\information\programmers\asp\images\"+ImageName WWWPathImageName = "/information/programmers/asp/images/"+ImageName 'Response.Write ""+ImageName 'Response.Write "
"+FullPathImageName 'Response.Write "
"+WWWPathImageName oMiles.Activate oMiles.Refresh oMiles.FilterTaskLines "1","AND",txtString1,CStr(BoolType),txtString2 oMiles.SaveBitmap (FullPathImageName) oMiles.Close "NoSave" Response.Write "
" End If %>