Page 1 of 1

sum over a certain ID

Posted: Fri Mar 04, 2005 10:09 am
by happydermis
Summery of equal fields____I have some fields I would like to summarise together in case they have the same ID. Here is an example.____This is how my table looks like (more or less_):____ID-No._____Price__123 _______4.00__444 _______2.50__444 _______5.00__324 _______7.43__444 _______1.50 ____And in my report I would like to summarise all the prices that have the same ID-No. The thing is: I don_t know which ID-No I have before running the report. That means that I have to tell R&R _sum all the prices that have the same ID-No_.__I guess I have to use a condition for that but how do I actually tell R&R to sum over a _wild card_?____This is how my report will look like:____ID-No._____Price__123 _______4.00__444 _______9.00 // a sum of all fields with ID-No. 444__324 _______7.43______Thanks! Dekers__

=> RE: sum over a certain ID

Posted: Fri Mar 04, 2005 11:40 am
by Randall_Warden_(Guest)
Define a group for ID_NO - you may also want to sort by ID_NO. Then create a Total Field (ID_NO_TOT) with a reset on the ID_NO group. Finally, place ID_NO_TOT in an ID_NO bandline.____Randall

==> RE: sum over a certain ID

Posted: Fri Mar 04, 2005 1:35 pm
by happydermis
Thank you very much for your answer!____One more question: what does "with a reset on the ID_NO group" mean?__Does ^reset^ refer to the ^Accumulation^ in the ^New Total^ field in R&R? ____Thanks, Dekers

===> RE: sum over a certain ID

Posted: Fri Mar 04, 2005 2:09 pm
by Randall_Warden_(Guest)
It refers to the group Reset (Grand Total, group1, group2....). Put the total field in a group footer line so that all the records will be processed and create the correct total(s).__

====> RE: sum over a certain ID

Posted: Fri Mar 11, 2005 1:39 pm
by happydermis
Hi all__I was trying to do it as Randall told me too but I always end up missing some lines of my report. The thing is: I have a multi-SCAN report. I have one controlling table that scans two other tables (that in its turn scan further tables). __In the beginning I put all the lines of my report in bands with the same group: the 2GF-ID.The first group is the 1GF-WHICHSCAN that controls, which table should be scanned. What happened was that the scan of the first table worked just fine (summing up one ID that had 2 production prices and presenting all the other prices just correctly) but the scan of the second table produced only the last line of the scan (usually I have 6 lines for this article and this time I got only the last line of it).__Than I wanted to place the scan of the first table in the band-line _2GF-ID_ and the scan of the other table in an _empty_ band-line because the scans from the second table shouldn_t actually be totalled. I couldn_t do this because every time I added a new empty GF-band it was placed above the 2GF-ID, which is not the right order I would like to have in my report.____So here is my question: what is the right way to sum up a certain column in my report (in case it has redundant ID-No.) without interfering with the scan of the other table?____And another question: soon enough I am going to have a new column in the report that will have redundant lines in it (the span of producing a certain product _ each product has few production times). This information comes from a completely different table than the one I am using now to sum up (the ID field) _ how is it possible to separately make R&R sum a certain field from one table and also sum another field from a different table when both fields are on the same band line (in this case 2GF-ID)?____Thanks, Dekers __

=====> RE: sum over a certain ID

Posted: Mon Mar 14, 2005 4:01 am
by happydermis
Hi all,____I managed to solve the first problem - even that I don^t know if this is an elegant solution. What I did was to leave the calculation of the first table in the 2GH-ID but to change the sum-field to ^pre-processed^. Will this coast me more time for report generating? Do you know any better solution? But there is no good without evil: I am still missing one line of me report that should be extracted from the first table _ any idea why??____If my explanations weren^t clear please tell me - I would send any possible information that would help others help me____Thanks, Dekers__

======> RE: sum over a certain ID

Posted: Mon Mar 14, 2005 5:48 am
by happydermis
Hi again,__I added a new Relation to my report. This caused my sum-field to appear two times for each product (incorrectly). I tried to eliminate this effect by adding a condition to the sum-field: IIF(SCANNING(TABLE01),True, False) but this didn^t work for me.____Why do I get two records of one product (one with price and one without) when I add a new table to my report? How could I eliminate this effect?____Thanks, Dekers