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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Total problem

Status
Not open for further replies.

tedi1

Technical User
Aug 25, 2002
87
IL
Hi,

I want to make a running total based on a condition.
I have looked at threads like: thread767-298199 and have fallowed the instructions but instead of getting the total I getting a series of totals for each record (each Detail line). The only thing I want to display in the report is some running totals with no other data.
What am I doing wrong?
I'm using CR 8.5 on W2K.
 
Could you post the formulas you have created, plus a sample of the data your querying and the expected results.

This would make it far easier to assist with your question. Reebo
Scotland (Going mad in the mist!)
 
At first I want to check this only with one formula in the evaluate: {COMPANY.ID} <> 0

Hope it helps you to help me
 
If you are just after a total where {COMPANY.ID}<>0 then create a formula :

If {COMPANY.ID}<>0 then 1 else 0

And place in detail.

right click field and select summary and SUM.
Suppress details section.

If you need further assistance, an example of data and expected results would help. Reebo
Scotland (Going mad in the mist!)
 
If you only want to display the final total, be sure to place it in the group footer (if you are grouping) or in the report footer, and suppress the details section.

If you are getting a series of totals in the details section like:

4
4
4
8
8
8

but you only want to show:

4
8

then you just need to format the running total field and check &quot;suppress if duplicated.&quot;

If, on the other hand, details are inappropriately being incremented multiple times, we need a little more information. Are you using the running total expert? What summary function are you using? You mention that you are evaluating based on a formula, but do you want your result on a change of group or for the report as a whole? Could you show us what you would like your final report to look like with some sample data? It might help to know what tables you are using and how they are linked, too.

-LB
 
Hi,

lbass I have took your advice and it eorks just fine, but now I have another question:
I need to enter the same formula but this time it should look like this: {COMPANY.ID}<>0 and {COMPANY.ID} Not Like '5*'

there is a problem with the 'Not'. How can I do somthing with 'Not Like'?
 
You use a numeric for the first compare, and a text for the second, so CR will hiccup.

Are you trying to get all that are 0, and all those numbers that start with the number 5, or???

If so, use something like:

{COMPANY.ID}<> 0
and
left(totext({COMPANY.ID}),1) <> &quot;5&quot;

If not, check your field types and use appropriate compares, a number cannot be compared to text.

-k
 
The Not goes first in Crystal syntax ie.

Not ({COMPANY.ID} Like '5*')

For some reason Crystal seems to always want parenthesis around the statement Not is referring to.

Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top