I have a report which needs to output a sum of the transactions per item. I need not display the list of the transactions, just the sum. But if i'll suppress the "detail" part, i get a wrong result. Can somebody explain why?
No problem.
You are probably accumulating values once per record when you really want to accumulate values once per group.
Use runing totals rather than regular totals and adjust the accumulation rules. For example, if you were working with salesmen, customers and invoices (one salesman has many customers, one customer can have many invoices) and you wanted to show gross sales per salesman, and gross sales was a field in the customer table, but for some reason you also had to link to the invoices table), you would group on the following:
1 - salesman
2- customer
The running total would accumulate once per group 2 and reset on each group 1. Howard Hammerman,
Crystal Reports training, consulting, books, training material, software, and support. Scheduled training in 8 cities.
howard@hammerman.com
Yes, i'm using the running total field. I have an ITEM group and per item are multiple sales transactions (Detail). Then i have a running total of the total sales per item(Group Footer). If i'll display all the transactions, the total is okay. But i need not display the transactions, i just need to show the total sales per item. So, what i did is to suppress the detail. It is when i suppress the detail part when i get a different result for my total sales per item. I can't find the reason why. Please help.
Record suppression does not keep the records from evaluating in any group totals or grand totals on your report. There are 3 options:
1) Use a record selection formula to exclude the records from the report
2) Use running total fileds
3) Use variables
There is a very good FAQ on using variables, see the FAQ section for details. Software Support for Macola, Crystal Reports and Goldmine
dgillz@juno.com
Are you using a running total formula with variables or a running total field?
If a formula post it here.
If a RT Field, post the settings used. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
While you are using a running total, I bet you have not
adjust the 'accmulation' option. It is probably accumulating once per record. You need to accumulate once per group. Select your 'lowest' group (that is the group with the highest number).
that should work. Howard Hammerman,
Crystal Reports training, consulting, books, training material, software, and support. Scheduled training in 8 cities.
howard@hammerman.com
Is it higher or lower with details suppressed? It shouldn't be either. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
Actually, I think I know what the problem could be. There is only ONE feature of CR that retrieves different records based on whether the details are suppressed or not. Do you have the setting "Perform Grouping on Server" turned on? If you do, suppressing details will change the SQL statement and only retrieve summary records.
Go to:
File - Report Options
in this report to shut this off. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
ken:
i've checked the "Perform Grouping on Server" option, it's turned off
dgillz:
I tried you're suggestion, instead of inserting the other fields in the detail part and suppress it, i used formula then emptied the detail part, so nothing is in there so i don't have to suppress that part anymore. I need to move that part so no spaces will be displayed, but then i still have the same problem, but if i'll put some space, the result is ok. I have one observation, there's a discrepancy with the result when it's the first record of the page, but the rest of the page is ok.
Only the top of the page? That is a different problem.
Are you using version 7 by any chance?
Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
Version 7 has some bugs with running totals that sometimes crop up when you use the group options:
'keep group together' or
'repeat group header on each new group'.
Go into your change group expert and shut these settings off for all groups and see if that has an effect. This should not be directly related to the suppressed details, but it might be more noticeable when the details are suppressed. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
The 'keep group together' and 'repeat group header on each new group' options are turned off. I turned on the 'keep group together' option and the result is now ok. ????
Does it have something to do with that option? Or is it the bug of crystal 7 you mentioned that caused this problem? I hope it really solved my problem.
Anyways, thanks a lot for all the solutions that you guys gave! Thanks howard, dgillz and ken.
Yes, this is the bug that I was referring to. I thought it was the other way around, but my memory may be failing me. There was a maintenance release for v7 but I am not sure if it fixed this bug. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.