This topic is locked
[SOLVED]

 Colums Total in List Page

11/11/2009 8:44:32 AM
ASPRunnerPro General questions
I
ishaqani author

I am using ASPRunner. I have made search and list pages of my access database with Total of [C20] & [C40] Colums of Database. Problem is that ASPRunner Total option is dividing Total into various pages according to database and search query. For example i m searching word "Sugar" in my database. The Result is showing 2 pages and Total of [C20] and [C40] Colum is showing total as per pagewise. 1st page showing [C20] total is 500 and 2nd page is 200. I want to need changes in code that Total should not be divide in various pages according to search query it must be show [C20] Total 700 unless i move to 2nd page.
Would appreaciate sample code or Help. Below code is showing total of the [C20] colum not with search query.
str = "select sum(C20) from 652

Set rstmp = server.CreateObject("ADODB.Recordset")

rstmp.open str,dbConnection

Response.write "C20 Total: " & rstmp(0)

rstmp.close

set rstmp=nothing

I
ishaqani author 11/11/2009

I would be very much thankful for immediate response / help. Thanks

J
Jane 11/12/2009

Hi,
where clause is stored in the strWhereClause global variable:

if strWhereClause<>"" then

str = "select sum(C20) from 652 where " & strWhereClause

else

str = "select sum(C20) from 652"

end if


I recommend you to contact support@xlinesoft.com directly with all urgent questions.

I
ishaqani author 11/12/2009

Thanks dear for your kind help.
below is the final Snippet which is working well according to my requirment.
Set rstmp = server.CreateObject("ADODB.Recordset")

str = "select sum(C20) from 652"

if strWhereClause<>"" then

str = "select sum(C20) from 652 where " & strWhereClause

else

str = "select sum(C20) from 652"

end if

rstmp.open str,dbConnection

Response.write "C20 Total: " & rstmp(0)

rstmp.close

set rstmp=nothing
For other newbie users, above code is showing Total result as per search criteria and not dividing into multiple pages.
Thanks.