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...
do until rsData.EOF
TTL_SALE = TTL_SALE + rs("SALES")
The output would be like:
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?