CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Totaling Search Results

Print topic Send  topic

Author Message
andrico

Posts: 12
Posted: 12/10/2004, 9:17 AM

I have an .asp search form. The results are determined by 3 data fileds, PNumber (ANI), StartDate (s_DisconnectDate) and EndDate (s_DisconnectDate2) from my 'LDData' table. The search form works great but I need to total one of the columns on the form, 'CallDurations' AS TotalMinutes. My current SQL Script doesn't calculate the total for just the results displayed instead it totals all info in the table because I can't figure out the 'Where' part of the code. Here is what I have so far.

sSQL = "SELECT Sum(LDData.CallDuration) AS TotalMinutes" & _
" FROM LDData" & _
" Where (????)"


I only want to total the 'CallDuration' column for the PNumber and data ranges entered by the user not the entire table. Any help would be greatly appreciated.
_________________
Rico
View profile  Send private message
peterr


Posts: 5971
Posted: 12/10/2004, 9:35 AM

You'd use GridName.DataSource.Where
Please try this forum search:
http://forums.codecharge.com/search.php?s_keyword=ccdlo...[]=21&s_period=
then search the forum threads for "DataSource.Where" to see how others use it.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.