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

Quantity Calculation 1

Status
Not open for further replies.

AntonioPerera

Vendor
Jan 29, 2006
91
AU
Hi,
I am trying to modify a standard Invoice report created by someone else:

The report heading are as follows :
Description
Amount
Tax amount

The following groups exist :
Group # 1 - Customer
Group # 2 - Invoice or Entry
Group # 3 - Detail Group

The following details exist :
Details a
Details b
Details c

There are several different restrictions on the section experts Supress formulas.

The complication about the report is that it picks up details from a Comments field and splits it into 2 or more lines depending on the page breaks inserted into the comments field.

So some details appear as follows :
Consultant A
From 10/01/2008 to 15/01/2008

Whereas some appear as follows :
Consultant A
From 01/06/2008 to 15/06/2008

Consultant B
From 06/09/2008 to 15/10/2008

Consultant C
From 19/04/2008 to 30/04/2008

Now I need to add the Quantity column to the report
and it works fine with the single line Invoices but gives a problem with the quantity calculation on the multi line Invoices.

So a single line Invoice appears as follows :
Consultant A Qty 100
From 10/01/2008 to 15/01/2008

Whereas on the multi line it appears as follows :
Consultant A Qty 88.88
From 01/06/2008 to 15/06/2008

Consultant B Qty 88.88
From 06/09/2008 to 15/10/2008

Consultant C Qty 88.88
From 19/04/2008 to 30/04/2008


Any ideas on how to solve this problem with the quantities on the multi line Invoices ?

 
This would have been easier to respond to if you had identified the actual fields you grouped on and if you showed what fields/formulas you were placing in each detail section. We also need to know the contents of any suppression formulas.

Should we assume that you only want to see 88.88 for the second sample? What is the calculation you are trying to do?

In general, you can probably use a running total that evaluates based on a formula like:

(
onfirstrecord or
{table.group3field} <> previous({table.group3field})
) and
<the opposite of your suppression formula>

Reset at the footer level where you want to show the result.

-LB
 
Hi LB,
You are wonderful in giving guidance even though I have not clearly set out the information.
Great going and thanks for that...


My details were grouped on the following
Group # 1 - Customer
Group # 2 - Invoice or Entry
Group # 3 - Detail Group

The supression formulas are as follows :
Group Header # 1 - Customer
Nothing

Group Header # 2 - Invoice or Entry
{@_IsSummary} or {@_UsesSummaryNarrations}

Group Header # 3 - Detail Group
if {@_IsSummary} or {@_UsesSummaryNarrations} then
true
else
false

Group Footer # 1 - Customer
Nothing

Group Footer # 2 - Invoice or Entry
Nothing

Group Footer # 3 - Detail Group
{@_IsDisbursement} or {@_IsSummary} or {@_IsCreditNote} or {@_UsesSummaryNarrations}


In the second example I don't want to see the 88.88
grand total, insted I want to see the individual quantity for each consultant.

A example of what I want to see is :
Consultant A Qty 44.44
From 01/06/2008 to 15/06/2008

Consultant B Qty 33.33
From 06/09/2008 to 15/10/2008

Consultant C Qty 11.11
From 19/04/2008 to 30/04/2008

So when I did the evaluation on the running total as per your instruction, it only shows me the value of the first line of the detail line.

Also, I wanted to know on <the opposite of your suppression formula> - which supression formula should I be reversing ?


Thank again for the support..
 
How did you get the 88.88? Is that a formula? In your first post, were you showing us a sample from the detail section or from the Group #3 section?

-LB
 
The 88.88 was from a Running total
It was from the detail C section.

My sections are laid out as follows :

Group Header # 1 - Customer
Group Header # 2 - Invoice or Entry
Group Header # 3 - Detail Group
Detail a
Detail b
Detail c
Group Footer # 3 - Detail Group
Group Footer # 2 - Invoice or Entry
Group Footer # 1 - Customer


 
Please identify the report sections next to each "line" below.

Consultant A Qty 88.88
From 01/06/2008 to 15/06/2008

Consultant B Qty 88.88
From 06/09/2008 to 15/10/2008

Consultant C Qty 88.88
From 19/04/2008 to 30/04/2008

Then also explain how the running total is set up.

-LB
 
Those were placed on Detail C
The running total was placed on Detail C without any Evaluation or Reset Options.

 
Sorry, but if that were the case, you would not get the same running total value for each record. You also did not identify the field you were summarizing or what the summary is in the running total. What field holds the quantities that you showed earlier--44.44, 33.33, 11.11? If these were in the detail section, the running total would have shown 44.44, 77.77, 88.88.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top