Thanks for your reply Spooky, here is my code snippet
page1.asp
<html>
<body>
<%
'recordset object
'connection object
'connection string
'SQL query
%>
<form method="POST" action=SQL-ADO-Client-Or-Server.asp>
<table>
<tr>
<td>Column Field:</td>
<td><select size="1" name="colfield">
<option>-Select One-</option>
<% While Not rsObj1.EOF %>
<option value="<% Response.Write rsObj1("COLUMN_NAME")%>"><%Response.Write rsObj1("COLUMN_NAME")%></option>
<%
rsObj1.MoveNext
Wend
%>
</select></td>
</tr>
<tr>
<td>Row Field:</td>
<td><select size="1" name="rowfield">
<option>-Select One-</option>
<% While Not rsObj2.EOF %>
<option value="<% Response.Write rsObj2("COLUMN_NAME")%>"><%Response.Write rsObj2("COLUMN_NAME")%></option>
<%
rsObj2.MoveNext
Wend
%>
</select></td>
</tr>
</table>
<input type="submit" value="Submit" name="B1" tabindex="4"><input type="reset" value="Reset" name="B2" tabindex="5"></font></p>
</form>
</body>
</html>
page2.asp
rowvalue=request.form("rowfield")
colvalue=request.form("colfield")
strSQL = " SELECT "&rowvalue&", "&colvalue&", EquipNumber FROM vw_sales"
'the below is the function call to create crosstab
Call objCrossTab.processOnServer(strDSN, strSQL, strCallingFile)
page3.asp
we just have the function routine here...
thank you
also look at this..i made this small test below in my page2.asp to see if it only the problem with losing variables...i did the following...
rowvalue=request.form("rowfield")
colvalue=request.form("colfield")
if rowvalue<>"" AND colvalue<>"" then
strSQL = " SELECT "&rowvalue&", "&colvalue&", EquipNumber FROM vw_sales"
else
hardcoded sql query
end if
everything worked fine...crosstab gets build every time i try to drill any item inside it...when it loses variables i get something like SELECT , , EquipNumber FROm vw_sales and crosstab doesnt get build