Count of items with feature
Count of items with feature
(OP)
I need to pull information from this table:

I'd like for my report to output the Stock Code for any Sales Order which has the line "~~HARD ANODIZE WATER JACKET~~ 151.00". I'd like for the stock codes to be grouped and the count for each stock code to be displayed.
Stock Code LineType will always = 1.

I'd like for my report to output the Stock Code for any Sales Order which has the line "~~HARD ANODIZE WATER JACKET~~ 151.00". I'd like for the stock codes to be grouped and the count for each stock code to be displayed.
Stock Code LineType will always = 1.
RE: Count of items with feature
{SalesOrder.LineType} = "1" and
{SalesOrder_1.NComment} = "~~HARD ANODIZE WATER JACKET~~ 151.00"
Note that the two rules reference one field from each of the two tables. From there you can group by StockCode (from the FIRST table) and count the number or records. If the comment can occur twice on the same SalesOrder than you might need to do a DistinctCount of the SalesOrder instead of just a count.
Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
http://www.kenhamady.com/
RE: Count of items with feature
Would I be able to do the same thing to get counts of Comment Combinations??
RE: Count of items with feature
Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
http://www.kenhamady.com/
RE: Count of items with feature
RE: Count of items with feature
Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
http://www.kenhamady.com/
RE: Count of items with feature
SELECT o.MStockCode, cmm .NComment, Count(*) as NumberOfComments
FROM Orders o
INNER JOIN (
FROM Orders
WHERE LineType=6
GROUP BY o.MStockCode, cmm .NComment
The inline query will get each comment per stock code using salesorder number to match them. The main query and the group statement will count the number of the same comments per stock code (ignoring the sales order). Again , I am not sure if this is what you want, but usually grouping is easier and more flexible using a command, so you may benefit if you explore this approach.
www.R-Tag.com Viewer and Scheduler for Crystal reports, SSRS and Dynamic Dashboards.
RE: Count of items with feature