Solved

Count rows with different values in crystal report

Posted on 2009-04-14
5
515 Views
Last Modified: 2012-05-06
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..
0
Comment
Question by:Slythie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 6

Expert Comment

by:BALMUKUND KESHAV
ID: 24144744
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


0
 

Author Comment

by:Slythie
ID: 24144874
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
0
 
LVL 2

Accepted Solution

by:
XFishX earned 125 total points
ID: 24144977
Use the "Running Total" feature in Crystal Reports.

Perform a running count where 'sk_status' = SOLD
0
 

Author Comment

by:Slythie
ID: 24145139
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
0
 

Author Comment

by:Slythie
ID: 24145153
oh nvm... i got it.. thx u for ur help expert
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question