Link to home
Start Free TrialLog in
Avatar of Slythie
Slythie

asked on

Count rows with different values in crystal report

Dear experts,
I want to make a report that will display an item sale details. This report will show the item and which warehouse its being held and how many stocks are there in each warehouses. There's also a sale status for each of the item (Sold or Not Sold). I grouped the report according to warehouse and sell status. However, i want to know for each warehouse, how many of this item has been sold and how many are still NOT SOLD. How am i suppose to get around to do it? any formula that might help? Thanks experts..
Avatar of BALMUKUND KESHAV
BALMUKUND KESHAV
Flag of India image

First of all let us know your database structure and how data is being stored, is there any field which has calculated stock lying. If not  you will have to calculate the stock item wise, it includes opening stock, purchased during the period, sold during the period, and also credit note raised, all you will have to calculate/consider.

Regards,

Bm Keshav


Avatar of Slythie
Slythie

ASKER

this table is made specifically for 1 item. The item is called "Starter Kit". In this table, it will store:
- sk_id = got this data from invoice number from where the starter kit is being purchased
- sk_supplier = this data is taken from the supplier who supplies the starter kit
- sk_warehouse = this data is to store the warehouse ID where the starter kit is being stored
- sk_member_code = this data is a member code generated for each starter kit
- sk_status = this data is to show whether this particular starter kit has been sold or not.

Example:
warehouse 1 bought 3 starter kits from supplier 02. When the supplier sent that 3 starter kits, they will also provide unique member codes for each of the 3 starter kits. The table will look like this:

sk_id                sk_supplier        sk_warehouse          sk_member_code         sk_status
sup02-w01       sup02                  w01                          mem001                         NOT SOLD
sup02-w01       sup02                  w01                          mem002                         NOT SOLD
sup02-w01       sup02                  w01                          mem003                         SOLD

whenever that warehouse sell the starter kit to that particular member in member_code, the status will change to SOLD. Now how am i suppose to count the number of NOT SOLD and SOLD in crystal report? thanks experts
ASKER CERTIFIED SOLUTION
Avatar of XFishX
XFishX

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Slythie

ASKER

do i need a formula to do that? coz, when i use the running total, it will count all the rows in the field and am not able to distinguish the difference between SOLD and NOT SOLD
Avatar of Slythie

ASKER

oh nvm... i got it.. thx u for ur help expert