Goodmorning
I want little help again.
I have a field (1,2,3 values) that i have done it group by so i take something like that
1.Income
1 Thomas test 40
2 thomas test2 30
sum:70
2.Spends
1.thomas test 23
2.thomas test 35
sum:58
Total sum: income:70- spend:58
*Now i have done all the above but i cant do the last row. I dont know what field to put and how i can sum my groups above
I create a formula field and i have done something like that.
shared numbervar rtTotal;
if({Emp016.PelProm}="1") Then
rtTotal:=rtTotal+Sum ({Emp016.SynTeliko})
where the field pelprom is the field i group by and take values (1,2,3) and the field synteliko is the field with ammounds.
Now i want to get that at the end of report and not at the end of every group
GrandTotals
---------------------
Incomes: (sum of group with value 1)
Spends: (Sum of group with value 2)
Storesum of group with value 3)
Total: Incomes-Spends-Store
So at the end i want 4 new fields but i dont know how to do it...Any help?
Hi again. Your code works but for a strange reason works only if there are records in one of tree parts. For example if there are records at group 1 it works but if there are records on 3 groups it works only for the last one
Hi again. Your code works but for a strange reason works only if there are records in one of tree parts. For example if there are records at group 1 it works but if there are records on 3 groups it works only for the last one... I didnt understand that
"insert them in Detail Section & suppress them "
It means that you must insert the 3 formula fields in the details section of the report
and mark them as "suppress"
Right click on each formula, select format field and mark the "Suppress" property
It means that we don't want to see them in the report, we only want to execute
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
Ok. I got that. But how after that i will print them on report footer where i want to see them? I did what you told me and i put the 3 formulas on details and suppress them. Everything there seem ok. Now to print them at the end of the report i create 3 new formulas and i put inside that:
{@SumInocome} so the new field to see the other field we put the code you said. But it brings me 0 and i dont know what i have done wrong. Is any other way to print the result of the 3 fields of the details??? Sorry for my questions but i have start work with crystal last month
Last edited by Melina291; March 16th, 2013 at 02:23 AM.
Ok it works finally. But i want to ask something more...
When i print th 3 variables on the report footer like: Incomes
Spend
Store
-------------
I want something more like total at the end. What variable i should put for this. When i put numchar
total=Incomes-Spend-Store and the result was - it brought me false. What variable i have to use;
i put that but its wrong
WhilePrintingRecords;
numberVar totBuys;
numberVar totIncomes;
numberVar totStore;
numberVar Teliko;
Teliko=totIncomes-totStore-totBuys;
Last edited by Melina291; March 16th, 2013 at 05:42 AM.
Bookmarks