Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Problem - double sales amount for partner function Post Reply Post New Topic
Author Message
Jacky
Newbie
Newbie
Avatar

Joined: 10 Jan 2013
Online Status: Offline
Posts: 3
Quote Jacky Replybullet Topic: Problem - double sales amount for partner function
    Posted: 29 Jul 2014 at 5:52am
I will try to translate my problem as good as i can...so please excuse my bad writing
In my example I have one customer with different materials. I need to know how much money he makes with each of the materials.
I put a group on Material-No.. So far no problem.
But now I need to include 2 Partner functions. VE and RG. I get those functions from table KNVP.
I put a filter in: {KNVP.PARVW} in ["RG", "VE"]

I added 2 Formulars:

Forumlar for „VE“:
if {KNVP.PARVW}="VE"
then {KNVP.PERNR}
else ""

Formular for „RG“
if {KNVP.PARVW}="RG"
then {KNVP.KUNN2}
else ""

The results are like this:

Kd-Nr           Name           Material          VE              RG                 Juli 2014
207447          Test             12345            12                                    $100 (Details)
207447          Test             12345                             290000           $100 (Details)
207447          Test             12345            12              290000           XXXXX    (group level – sum should be $100 and not $200)
207447          Test             98765            12                                    $200 (Details)
207447          Test             98765                             290000           $200 (Details)
207447          Test             98765            12                                    $300 (Details)
207447          Test             98765                             290000           $300 (Details)
207447          Test             98765            12              290000           XXXXX    (group level – sum and should be $500 and not $1000)

I added the highest amount for VE and the highest for RG , so I have both functions on one level and I can see that the customer 207447 has VE 12 and RG 290000.
My problem now is that I have the sales amount double for the same material… its $100 on VE Details and $100 on RG-Details (first 3 rows). SO I can‘t build a sum on the sales, but I really need the sum.

I want it to look like this on group level:
Cust            Name           Material          VE              RG                 July 2014
207447          Test             12345            12               290000          $100
207447          Test              98765           12               290000          $500


Any idea how I can fix that problem ???
Thanks in Advance
Jacky

Edited by Jacky - 29 Jul 2014 at 5:53am
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 29 Jul 2014 at 7:03am
you could try

summing this formula

if {KNVP.PARVW}="VE"
then {KNVP.amount}
else 0

it should work for your example, but i'm not sure how consistent it is with duplication.
IP IP Logged
Jacky
Newbie
Newbie
Avatar

Joined: 10 Jan 2013
Online Status: Offline
Posts: 3
Quote Jacky Replybullet Posted: 29 Jul 2014 at 7:43am
Hi Kostya,

thanks so much for your help.

I had the following formula already for my amount...

if (month({S511.SPTAG}) = 07) AND (year({S511.SPTAG}) = 2014)
then {S511.ZUMKZWI3}
else 0;

I changed it to the following:
if {KNVP.PARVW}="VE"
then
if (month({S511.SPTAG}) = 07) AND (year({S511.SPTAG}) = 2014)
then {S511.ZUMKZWI3}
else 0;
It was an easy change... but I just didn't see it.

This field is now in details (instead of the original amount field) and I see just the amounts from VE.
Now I could set the sum... and it works fine in my little example. I will see how the big report likes it :-)


Thank you very much. You made my day...
Jacky



IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.