Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IMPROMPTU HELP with COUNT........URGENT!! 2

Status
Not open for further replies.

jefRPT

Programmer
Dec 17, 2001
29
US
Hi ALL,
This might be an easy question, but for some reason I'm going crazy over it. Say for example, I have a report which is a list of:

Animals, Date Purchased, Age, Weight, Gender, etc.

In the header, I want to insert a calculation where I can state the quantity(count) of each gender. For Example:

Male:12,000
Female:22,000

So for males I would have to look in "gender" column and COUNT everything thats LIKE "M%" and for females, I would have to look in the same column and COUNT everything thats LIKE "F%". But for some reason, I'm not able to use the LIKE command, meaning, its not one of the "Available Components". Please Help Me Out.
THANKS IN ADVANCE!! =)

-Jeff
 
Here's what you need to do.

Insert a new calculated column which does a count for gender like "M%". Similarly do another column for a count for gender like "F%"

After doing this instert a calcultion in the header frame for total (calcualted column for male)
do the same for female.

For some reason inserting a direct summary header for gender like "M%" or "F%" does not work as Impropmtu looks for Male in only the first row of the column (Gender)

And the other thing about like, I was able to use like from the available components.

Let me know if the above works for you.

Vijay
 
If I do a count initally for "M%" and "F%" like you said, it would count everything in my report that starts with M and F, not just Male and Female.Or am I wrong?
 
In that case why don't you say,

If Gender = "Male" then count(Gender) Else Null
If Gender = "Female" then count(Gender) Else Null

Remember to create two columns for the above If statements.

Then create a calcualtion in the header frame for;

Total count(Male) and
Total count (Female)

If you still have trouble e-mail the imr and cat file alongwith the userclass and password and I will fix it for you since I have some free time today.
 
Thanks a lot!! It works out perfectly. I started using sub-reports and got the results I wanted but this saves so much spaces and time. Thanks again.
 
vijay,
I have a problem!! Using the method you told me, everything works perfect. But since I don't want the "extra columns" in my report. I chose to "hide" the unwanted columns. Now, when I use a prompt to pick a Start date and a End date for the Query, all of my totals are equaling "0" for some reason? Please tell me you know what I did wrong? Thanks.
-Jeff
 
ITS BEEN A LONG DAY..... I'M JUST GOING CRAZY...
Everything is fine, the reprts are working perfectly.
Once again, Thank you
[2thumbsup] [pc3]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top