Solved

# Crystal Reports Exclude

Posted on 2006-06-06
380 Views
I've creating a report in Crystal Reports 10.  I need to create a formula to exclude some line items from the report.  This is what I need to do:
"Total for line items that do not have CostType_CD = 'Expense'.  then a Total for line items that do have CostType_CD = 'Expense'.  (I assume is one forumula)

Next formula would be:

Sum of ReserveAmount1 for all reserves where ReserveType1_CD in ('Bodily Injury', 'Expense', 'Pulmonary Disease')

Do I need to create groups?

I need very explicit instructions, I've only attended a two day Intro class on Crystal.  Therefore, if any of this sounds strange, tell me so, I'm learning.

0
Question by:yyyafp1

LVL 100

Expert Comment

Try this

Build 3 running totals
Display the field insertion popup
Click the Running Total tab
Click NEW (may have to right click)

First one
Name - Total_NoExpense
Type - Sum
Field - CostField
Reset - Never
Execute - Use formula
Formula -
{CotType_CD} <> 'Expense'

Similarly for the other one
Name - Total_Expense
Type - Sum
Field - CostField
Reset - Never
Execute - Use formula
Formula -
{CotType_CD} = 'Expense'

Third
Name - Total_Reserve
Type - Sum
Field - ReserveAmount1
Reset - Never
Execute - Use formula
Formula -
{ReserveType1_CD} in ('Bodily Injury', 'Expense', 'Pulmonary Disease')

mlmcc
0

Author Comment

According to Expert Wykabrian, "A union will only display the structure of the first select statement but the table will contain the combination of both tables in the Record set."

Therefore, when I create thie third suggested running total, it should look like this:
Name - Total_Reserve
Type - Sum
Field - Command.LineItemAmount
Reset - Never
Execute - Use formula
Formula -
{Command.CostType_CD} in ('Bodily Injury', 'Expense', 'Pulmonary Disease'

When I do this, I receive the error message:  ')' is missing.
0

LVL 100

Expert Comment

The formula needs a ) at the end

{Command.CostType_CD} in ('Bodily Injury', 'Expense', 'Pulmonary Disease' )

mlmcc
0

Author Comment

Although there isn't a ')'  in the example, there is one in the formula that still isn't working.

0

LVL 100

Accepted Solution

Try changing the ( ) to [ ]

{Command.CostType_CD} in ['Bodily Injury', 'Expense', 'Pulmonary Disease' ]

mlmcc
0

LVL 100

Expert Comment

mlmcc
0

## Featured Post

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…