CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Count Help

Print topic Send  topic

Author Message
Joe
Posted: 06/18/2004, 10:15 AM

Hello,
I am using the following before show event code to get the sum of a Field,

Quote :
GRID.LABEL.Value = CCdlookUp("COUNT(FIELD)", "GRID", GRID.DataSource.Where, DBConnection1)

This Code Works Perfect, , ,,,,

But the Field counting has 3 different values in it, I/O/3, is their a way to count up each value,for a total count on each value, if i had three different labels with before show events, e.g.

Quote :
Grid.field.value=ccdlookup("Count(Field)",where grid.field.value = I, GRID.DataSource.Where, DBConnection1)
Anybody have any clue, Thanks
Using .ASP, CCS, MS Access.
Tuong Do
Posted: 06/21/2004, 10:26 PM

Hi Joe,

You can use this for each label

Label1
<Code>
Grid.field.value=ccdlookup("Count(Field)",where grid.field.value = I,
GRID.DataSource.Where & " AND Thefield='I' " , DBConnection1)
</code>

Label2
<Code>
Grid.field.value=ccdlookup("Count(Field)",where grid.field.value = I,
GRID.DataSource.Where & " AND Thefield='O' " , DBConnection1)
</code>

Label3

<Code>
Grid.field.value=ccdlookup("Count(Field)",where grid.field.value = I,
GRID.DataSource.Where & " AND Thefield='3' " , DBConnection1)
</code>

It is assumed that the field name TheField is a text field

cruisin

Posts: 31
Posted: 09/07/2004, 7:50 AM

Would you mind posting the actual code from an example. I tried using Tuong's example and kept getting syntax errors. I think there is something wrong with the where grid.field.value =I reference. The syntax is correct in Joe's example. I tried a couple different variations and couldn't get it to work. I'm currently using multiple grides to do the same thing which isn't really efficient.
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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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