# Crystal Report Formula Question

Best way â€“ use the three formula trick for Crystal. You have the control instead of wondering what Crystal is doing with Sums (which can be wrong depending on your Grouping) and I have hit or miss success with Running Totals so I never use them anymore.

WhilePrintingRecords;

Shared NumberVar GroupSum;

GroupSum :=0;

-          This declares and set the variable â€œGroupSumâ€ to 0

At the place you what to do the calculation

WhilePrintingRecords;

Shared NumberVar GroupSum;

GroupSum := GroupSum + (Field or Expression you want to add)

OR

GroupSum := If Condition A then GroupSum + (Field or Expression you want to add) Else GroupSum

-          This will control exactly when you want to add

-          The If can be expanded for more If/Else conditions

In the Group Footer where you want to display it

WhilePrintingRecords;

Shared NumberVar GroupSum;

Scott

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of cathy@...
Sent: Monday, September 09, 2013 5:45 PM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: Crystal Report Formula Question

There are many different ways to do this -

One way is to create a formula for plant A and B in the detail section of the report (which would be suppressed)

I don't know what tables you are using but,  If Plant = A then OnHandQty Else 0
If Plant = B then OhHandQty Else 0

Then you can add a summary for Plant A and B  by Part Number -

--- In vantage@yahoogroups.com, <clederer@...> wrote:

In my Crystal Report I have 2 groups Plant A & Plant B). I'm trying to create a formula to summarize the data in the group fields:

part #123 Quantity Cost
Plant A 5 50

Plant B 1 10

part #123 Quantity Cost
Plant A 1 10

Plant B 0 0

part #123 Quantity Cost
Plant A 4 40

Plant B 2 20

NEED FORMULA FOR:
Quantity Cost
Plant A 10 100
Plant B 3 30

In Crystal, I'm creating a report regarding thrown out inventory. I don't want to include a certain item on the report, and I'm having a hard time coming up with an equation saying "If TABLE.FIELD = SPECIFICITEM, then do not include on the report.

I'm not sure what formula to use for this
If partnum=" " then partnum else " "

Sent from my iPhone

On Aug 28, 2013, at 5:36 PM, "clederer@...<mailto:clederer@...>" <clederer@...<mailto:clederer@...>> wrote:

In Crystal, I'm creating a report regarding thrown out inventory. I don't want to include a certain item on the report, and I'm having a hard time coming up with an equation saying "If TABLE.FIELD = SPECIFICITEM, then do not include on the report.

I'm not sure what formula to use for this

[Non-text portions of this message have been removed]

M

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of clederer@...
Sent: Wednesday, August 28, 2013 4:35 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Crystal Report Formula Question

In Crystal, I'm creating a report regarding thrown out inventory. I don't want to include a certain item on the report, and I'm having a hard time coming up with an equation saying "If TABLE.FIELD = SPECIFICITEM, then do not include on the report.

I'm not sure what formula to use for this

[Non-text portions of this message have been removed]

REPORT > SELECT EXPERT > RECORD

That is how I filter out Warehouses.

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of clederer@...
Sent: Wednesday, August 28, 2013 2:35 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Crystal Report Formula Question

In Crystal, I'm creating a report regarding thrown out inventory. I don't want to include a certain item on the report, and I'm having a hard time coming up with an equation saying "If TABLE.FIELD = SPECIFICITEM, then do not include on the report.

I'm not sure what formula to use for this

[Non-text portions of this message have been removed]
Depending on the circumstances of what is being reported, I have used "suppress". It could be for the field or the report Section.

--- In vantage@yahoogroups.com, "clederer@..." <clederer@...> wrote:
>
> In Crystal, I'm creating a report regarding thrown out inventory. I don't want to include a certain item on the report, and I'm having a hard time coming up with an equation saying "If TABLE.FIELD = SPECIFICITEM, then do not include on the report.
>
> I'm not sure what formula to use for this
>
Depending on the circumstances of what is being reported, I have used "suppress". It could be for the field or the report Section.

--- In vantage@yahoogroups.com, "clederer@..." <clederer@...> wrote:
>
> In Crystal, I'm creating a report regarding thrown out inventory. I don't want to include a certain item on the report, and I'm having a hard time coming up with an equation saying "If TABLE.FIELD = SPECIFICITEM, then do not include on the report.
>
> I'm not sure what formula to use for this
>
Have you looked at Report > Select Expert > Record? And done your filter
there?

I've used that in the past.

Kurt H.

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of b35crile@...
Sent: Thursday, August 29, 2013 10:19 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Crystal Report Formula Question

Depending on the circumstances of what is being reported, I have used
"suppress". It could be for the field or the report Section.

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
"clederer@..." <clederer@...> wrote:
>
> In Crystal, I'm creating a report regarding thrown out inventory. I
don't want to include a certain item on the report, and I'm having a
hard time coming up with an equation saying "If TABLE.FIELD =
SPECIFICITEM, then do not include on the report.
>
> I'm not sure what formula to use for this
>

[Non-text portions of this message have been removed]
I want to condense "Part #" into a drill down so that each part appears once on the report and if you click on it, that is when you can see specifics about it

ON THE REPORT NOW:
Part #: Date
123 10/14/12
123 19/16/12
123 11/18/12
123 1/14/10
125 9/29/10

WHAT I WANT:
Part # Count:
123 4

I hope this makes sense, I figure it should be an easy fix. After trial and error, I'm not sure what formula to use
Hi Carl! The easiest way to do the count is to add a group for part - then right click your part or date and insert summary, count for the "Part" group (summary location).   As far as not displaying certain items on the report, if you don't even want to bring the records in and are using a BAQ report then you could filter before the XML is even generated.  Otherwise just use the "Select Expert" (looks like a yellow funnel in CR2008) , select the field, use "is not equal too" and put in your specific item you don't want to display.   Jenn --- In vantage@yahoogroups.com, <clederer@...> wrote: I want to condense "Part #" into a drill down so that each part appears once on the report and if you click on it, that is when you can see specifics about it

ON THE REPORT NOW:
Part #: Date
123 10/14/12
123 19/16/12
123 11/18/12
123 1/14/10
125 9/29/10

WHAT I WANT:
Part # Count:
123 4

I hope this makes sense, I figure it should be an easy fix. After trial and error, I'm not sure what formula to use
Yes, use the group option â€“ to group by Part. Then insert a summary (count summary) at that part group level as Jennifer suggested.

Then on the Report menu (I think), there is a Section Expertâ€¦Open that and highlight the details section and check the box to hide the details, drill down OKâ€¦

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of jlisser@...
Sent: Friday, August 30, 2013 8:10 AM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: Crystal Report Formula Question

Hi Carl! The easiest way to do the count is to add a group for part - then right click your part or date and insert summary, count for the "Part" group (summary location). As far as not displaying certain items on the report, if you don't even want to bring the records in and are using a BAQ report then you could filter before the XML is even generated. Otherwise just use the "Select Expert" (looks like a yellow funnel in CR2008) , select the field, use "is not equal too" and put in your specific item you don't want to display. Jenn --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, <clederer@...<mailto:clederer@...>> wrote: I want to condense "Part #" into a drill down so that each part appears once on the report and if you click on it, that is when you can see specifics about it

ON THE REPORT NOW:
Part #: Date
123 10/14/12
123 19/16/12
123 11/18/12
123 1/14/10
125 9/29/10

WHAT I WANT:
Part # Count:
123 4

I hope this makes sense, I figure it should be an easy fix. After trial and error, I'm not sure what formula to use

[Non-text portions of this message have been removed]
In my Crystal Report I have 2 groups Plant A & Plant B). I'm trying to create a formula to summarize the data in the group fields:

part #123 Quantity Cost
Plant A 5 50

Plant B 1 10

part #123 Quantity Cost
Plant A 1 10

Plant B 0 0

part #123 Quantity Cost
Plant A 4 40

Plant B 2 20

NEED FORMULA FOR:
Quantity Cost
Plant A 10 100
Plant B 3 30

There are many different ways to do this -

One way is to create a formula for plant A and B in the detail section of the report (which would be suppressed)

I don't know what tables you are using but,  If Plant = A then OnHandQty Else 0
If Plant = B then OhHandQty Else 0

Then you can add a summary for Plant A and B  by Part Number -

--- In vantage@yahoogroups.com, <clederer@...> wrote:

In my Crystal Report I have 2 groups Plant A & Plant B). I'm trying to create a formula to summarize the data in the group fields:

part #123 Quantity Cost
Plant A 5 50

Plant B 1 10

part #123 Quantity Cost
Plant A 1 10

Plant B 0 0

part #123 Quantity Cost
Plant A 4 40

Plant B 2 20

NEED FORMULA FOR:
Quantity Cost
Plant A 10 100
Plant B 3 30