Crystal report- cross tab in group not calc. correctly

Posted on 2009-12-23
Last Modified: 2013-11-15
I have the following Crystal report command and in the report it groups by district, salesrep & plantype.  I have a cross tab in the salesrep grope and the district group. All summary and formulas work perfect in the sales group but in the district group I can not get it to calc. the correct MTD % PLAN (Last field in cross tab - see screen shot).  The formula is just actamt/planamt.  I have tried doing sum at group level but number never displays correct in the correct cross tab box.

Example: Sales should be 112.33% but shows 1011.40.  Also, if I do the sum(actamt)/sum(planamt) at the dist level it puts 1194.75 in each bucket (see 2nd screen shot)

Any ideas??

vw_shippingdays.currshippingdays as vw_currshippingdays,
case when slsrepplan.planamt = 0 then 0 else (slsrepplan.actamt/slsrepplan.planamt)*100 END as "plan%",
case when slsrepplan.planamt = 0 then 0 else (slsrepplan.actamt/fiscalperiods.shippingdays) * vw_shippingdays.currshippingdays END as "target",
case when slsrepplan.planamt = 0 then 0 else vw_shippingdays.currshippingdays/fiscalperiods.shippingdays * 100 END as "target%today"

from (((slsrepplan inner join fiscalperiods on slsrepplan.mth = fiscalperiods.month and slsrepplan.yr = fiscalperiods.year) inner join smsnmaster on smsnmaster.salesrepnumber = slsrepplan.slsrep) left join vw_shippingdays on fiscalperiods.shippingdays = vw_shippingdays.totalshippingdays)

Question by:kelsanit
    1 Comment

    Accepted Solution

    I figured it out! if I remove the sales rep group it works.  So, I am going to just do a sub report and pull it into the main report

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    zeroMAx challenge 20 66
    Speed Up Crystal Report 5 33
    array6 challenfge 6 49
    Business Object Server 2 9
    How to increase the row limit in Jasper Server.
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now