.NETGURU
Counting Fields
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-crystal' list.


Gavin
Hi All,
I have just started using Crystal Reports for reporting on my ASP.NET site
and have figured out the basics but now I have a problem.

I am trying to create a formula that will give me a count on a field when
the field is a 2.

ie. I have the following
Count ({dbt_Patient.pt_Sex},2)
Where {dbt_Patient.pt_Sex} is either equal to 1 or 2.
As far as I can tell this should work.. I have also tried
Count ({dbt_Patient.pt_Sex},{dbt_Patient.pt_Sex},2)

but I am getting the following error message
"The summary / running total field could not be created"

Thanks,
Gavin
PS: Sorry if this is not the place for these type of questions

Reply to this message...
 
    
Stouffer, Nathan
Well,

I'm still figuring out the basics on using CR in ASP.NET so I might be
emailing you
outside of the listgroup...but I do know Crystal Reports.

Here's how I would do it:

Create another 'formula field' call it @CountSex.

In the formula editor..create a formula like such:

Global numbervar counter;

If {dbt_Patient.pt_Sex} =3D 2 Then
counter =3D counter + 1
..........................................

and place this field right next to your field for Patient Sex and
suppress it ...then at the bottom put a running total field next to
something like 'Male Patients Total: 24'

nstouffer

-----Original Message-----
From: Gavin [mailto:Click here to reveal e-mail address]
Sent: Friday, June 21, 2002 7:41 AM
To: ngfx-crystal
Subject: [ngfx-crystal] Counting Fields

Hi All,
I have just started using Crystal Reports for reporting on my ASP.NET site
and have figured out the basics but now I have a problem.

I am trying to create a formula that will give me a count on a field when
the field is a 2.

ie. I have the following
Count ({dbt_Patient.pt_Sex},2)
Where {dbt_Patient.pt_Sex} is either equal to 1 or 2.
As far as I can tell this should work.. I have also tried
Count ({dbt_Patient.pt_Sex},{dbt_Patient.pt_Sex},2)

but I am getting the following error message
"The summary / running total field could not be created"

Thanks,
Gavin
PS: Sorry if this is not the place for these type of questions

| [ngfx-crystal] member Click here to reveal e-mail address =3D YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-crystal.asp =3D JOIN/QUII

***************************************************************************=
*
This email and any files transmitted with it are confidential and intended =
solely for the use of the individual or entity to whom they are addressed. =
If you are not the intended recipient, you are notified that disclosing, c=
opying, distributing or taking any action in reliance on the contents of th=
is information is strictly prohibited. Unauthorized viewing of confidentia=
l company information is prohibited. If you have received this email in e=
rror please notify the system manager.
IonBond Inc. 1598 E. Lincoln Ave Madison Hgts, MI 48071 248.398.9100
***************************************************************************=
*
visit www.ionbond.com

Reply to this message...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification