Multiple group footers or not

The report I’m making is based on transactions containing different currency codes. Currency code and currency amount are fields added to the g/l entry table by me. In the group footer I want to make group totals for each currency code.

And what is the question? If you should use mulitple group footers? I don’t get it. Can you explain.

Ok… this is a normal VAT entry report that i have added the currency amount used to the right. When u now do a groupfooter it just add up the amount that is in the Currency field. Not depending on the currency… as an example you can have one record with 100 EUR and one record with 100 USD. The groupfooter will now show this as: “Total currency 200” The code i use is a stanard groupfooter command like this: CurrReport.CREATETOTALS(Amount,“Investmenttax Amount”,BaseWithVAT,BaseWithoutVAT,BaseOutside,BaseInvTax,BaseInvTax0,CurrencyAmount); But what i would like to do is “break” it up and let the footer show per. currency. Like this: "Total EUR 100 " "Total USD 100 " I dont not know how many differente currency’s that will be used so i cant not make x number of “new” groupfooters either… Hope this make the question clearer =)

Hi! Now is clear. You should also use dataitem property GruopTotalFields and fill it with fields on wich you want your records to be grouped by. And then you can control in your groupfooter/head witch field caused the groupheader/footer CurrReport.SHOWOUTPUT := CurrReport.TOTALSCAUSEDBY = “VAT Entry”.FIELDNO(“Currency No.”); So you can use only one groupfooter for your all currencys. And if you set TotalFields property with Amount,“Investmenttax Amount”,BaseWithVAT,BaseWithoutVAT,BaseOutside,BaseInvTax,BaseInvTax0,CurrencyAmount), the totals for those fields will be created automaticly. Hope i was clear, if not ask. Bostjan

Frode, did you correctly set the GroupTotalFields property of the data item? Groups will only be created if you define the fields used for grouping here. You need to enter the currency field here, but watch out for the table key that is in effect. Check the online help for this property for more information. As an example of an entirely different solution, you might want to check report 206 (“debitor - invoice”, at least in the Austrian version ;-). Here, group sums for VAT by currency are created and accumulated in a temporary buffer, which is printed at the end of the report in an integer data item. – Heinz Herbeck Waagner-Biro AG, Vienna, Austria

Looks like it all comes down to the problem that currency code is not in “VAT Entry” table which is my DataItem table… right? But i got the currency in a variable that is picked up from G/L Entry… any chance i can use this one on a GruopTotalFields?

quote:


Originally posted by Frodio: Looks like it all comes down to the problem that currency code is not in “VAT Entry” table which is my DataItem table… right?


Oops… In this case, you’re out of luck regarding automatic grouping. You could try and create a Lookup-FlowField in the VAT table to the G/L table, but I guess you will have to implement per-currency totals by hand, using a temporary buffer. It’s not as difficult as it sounds. If you need help, just ask. – Heinz Herbeck Waagner-Biro AG, Vienna, Austria