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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pick one record from the group

Status
Not open for further replies.

crystalreport85

Programmer
Sep 27, 2010
51
CA
The report I am working returns more then one record because of the linkage.
group1 ord number--order#1
group2 itemno
lineno quantity color

1 10 1
1 10 1
1 10 1
group2 itemno
lineNo Quantity color
2 2 2
2 2 2

group1 ordNumber --order#2

group2 itemno
lineno quantity color

1 10 1
1 10 1
1 10 1

My question is I have to add the quantity for each line where the color is equal to 1.My answer should be
QuantityCount=20
how to do it? How do I pick just one record from the group itemno? And
Thank you
 
Hi,
What is the linkage - what tables are involved and what is the structure involved?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Insert a running total that does a sum of amount, evaluate on change of a formula:

(
onfirstrecord or
{table.orderno} <> previous({table.orderno}) or
{table.itemno} <> previous({table.itemno})
) and
{table.color} = 1

Reset never.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top