Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cross Tab first Cell Calculation Error

Status
Not open for further replies.

jmceuin

IS-IT--Management
Apr 7, 2009
17
US
Ok, I have a Crystal Report with a Cross Tab in the report footer. When I place the running total in the details to compare against the cross tab results and check the running totals are working correctly, I get 19 and 39 for Emergency which are the numbers of distinct orders and the number of lines in those orders. However on the first cell in the cross tab and only that first cell, it sums it incorrectly. For every other cell, the cross tab is right. The amount it is off is different if I refresh my data to a different time period. So it is not always off by 1 and 4 for example. In the end, all I want is the cross-tab. The Order Count is a distinct count of the order number for each record on change of the second group "Order Type" which is columns. The primary group is the customer account for the rows. The second number is the "Line Count" defined as a count of the items (not distinct) reset for the second group "Order Type".

I can email a full results file that has the details behind the cross tab (or that the cross tab should be reflecting I should say). But it is always the first cell and only the first cell that I am finding wrong thus far.

________Total______Emergency____Plan________Stock
100015__37_116_____20__43_______17__73_____0___0
100040__18__43______4___5_______14__38_____0___0
 
Are you saying that the crosstab shows a total for the row that does not match the individual columns in that row? Very odd. You couldn't have another column on the next page?

Alternatively, if you are using Distinct Count, it might count a customer who appears in two different columns for each of the columns but just once for the total. I'd have thought it should not, but it does make some sort of sense.

PS. It helps to give your Crystal version - 8, 8.5, 9, 10, 11, 2008 or whatever. Methods sometimes change between versions, and higher versions have extra options.


[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
I am using 2008. The first step is I have to define the group of accounts under a Master account by using left({ACCTNUM},6) which puts all '' 'C' and 'M' account numbers under the first 6 digits. 6 digits only is a parts account, 'C' added to the end is a container account, and 'M' added is a machine account. Anyway, this would eliminate the "doubling" I would expected because they are grouped on this standardized result from the formula.

The next grouping is on the classification of the order as Emergency, Plan, or Stock. The report automatically puts any orders not in one of those three in an unclassified overflow "Other". If you have an email, then I can send you a full PDF file that shows the details and the cross tab.
 
Sorry, no more ideas. Except you could do a test version of the report, to check details are being processed as you expect. Have you allowed for Nulls?

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
tried default for nulls, nulls excepted, and have a bit bucket for what falls out of range. I ended up just creating a bunch of running totals and summarized at the group 1 level then tossed the cross-tab. Stupid thing has issues with calculations from time to time and unless someone found a quick fix, can't spend much more time looking for that needle. Thank you for all your help though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top