View Full Version : Help~


aftershokk
12-04-2007, 06:43 AM
I am new to crystal and I am trying to summarize data to one line.

I have it summarized to one line but encountered one issue. I have a flag field where I want to summarize to a value I specify.

Example: in my details I have 2 records for a member with flags P or S. In the group header I want to display P if both exists else S. I wanted to use an if statement in the insert summary but it does not let me use a custom formula.

I am using version 11 desktop verion connected to Oracle

Mile-O
12-07-2007, 03:08 AM
I have 2 records for a member with flags P or S. In the group header I want to display P if both exists else S

I think you are going to have to give more detail here, or perhaps even an example. You say 'display P if both exist' yet don't say what this 'both' is. Is it the records for the member? If so, then the following may help:

Create a new formula and call it Flag Header.

In this formula, put the following code, obviously substituting field/group names for your own:


If Count({TableName}.{FieldName}, {GroupName}) = 2 Then
"P"
Else
"S"


You should then be able to put the formula directly onto the group header without inserting a summary.