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

[CR.8.5]Doublons of reference on group different

Status
Not open for further replies.

leuke

Programmer
Oct 13, 2005
4
FR
Hello with all,

I has just met a probleme on a state which I am in the train of dévolopper. Compared to the operation of the company one can assign an article to 1 or several customers, but with only one common quantity. Thus this article can "exist" at a customer X and another customer Y. the state whom I carry out must give me, for each customer the references articles and them quantité(un grouping on the Client reference). My probléme is that while passing from a group with another if the article is affected more than to one customer, it will leave on the various customers it is affected with thus the same quantity. what will distort my general calculation because the quantity of this article is as many added once as the number of customer. I would like if it is possible to detect the reference of the article and dice which it appears more than one once in the state to put its quantity at zero. Thank you for your assistance
 
If I've understood you, the same article can exist for more than one customers. If these are all in the same group, you could group them by article-code and suppress the details. Or sort them by customer within article, and do a Distinct Count, if your version of Crystal allows. You may also have this option for a running total.

Right-click on a field and choose Insert to get a choice of Running Total or Summary. Or else use the Field Explorer, the icon that is a grid-like box, to add running totals.

Running totals allow you to do clever things with grouping and formulas. They also accumulate for each line, hence the name. The disadvantage is that they are working out at the same time as the Crystal report formats the line. You cannot test for their values until after the details have been printed. You can show them in the group footer but not the group header, where they will be zero if you are resetting them for each group.

Summary totals are cruder, but are based directly on the data. This means that they can be shown in the header. They can also be used to sort groups, or to suppress them. Suppress a group if it has less than three members, say. They default to 'Grand Total', but also can be for a group.


[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
[yinyang] Windows XP & Crystal 10 [yinyang]
 
Hello,

I had thought of a array, then with each passage in my loop to read the table I check if the article is there already if such is the case I puts the quantity at zero and then with two formulas I increment the quantities. Except that am initial and does not control trés well the tables. What do you think about it?

thank you
 
I've not used arrays much. Try the method I suggested.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
[yinyang] Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top