How do I display parts of queried data in different sections of output?
I'm hoping someone can help. Here's my problem.
Lets say I'm building a report where I query SQL for data and display the individual lines and show a sum at the bottom...
The output would be like:
do until rsData.EOF
TTL_SALE = TTL_SALE + rs("SALES")
Now lets say I want to show the TOTAL at the top, before the detail.
So how does one go about getting the sum appear at the top before the detail, without having the query the SQL server twice ... once for the TOTAL and again for the detail? Is it possible to setup the SQL query as a function, or a way to pull the SQL data into cache to display in different parts of a page?