Pass result set to lotusscript function

Is there a way to pass query results from a lotus script agent to a function on the web?

I want to be able to run my query and pass the results to a function to print the results. I print the same results in a few different sections so a standard function to accept the results and print would be ideal.