Subtotal calculation

Pickering, John (NORBORD) John.Pickering at norbord.com
Fri Nov 12 09:33:33 CST 2010


The suggestion by Markus is OK and will give subtotals at each part
group. But that is not what the original poster asked. He asked that all
of the detail records for a part number, eg. "A", be listed followed by
subtotals for all of the part groups within "A".

My first reaction to this sort of request is to talk the users out of
the format they asked for and into something that Quiz is better at. If
that approach fails then build the more complex program.

The format requested will require two passes. The first pass will select
the detail data required to create the report and write it to a work
file. It will also calculate the subtotals by part group and add an
additional record to the work file for each part group. And you will
need to invent a record code of some kind to distinguish between the two
record types. This is probably easier in Qtp than Quiz. If this must be
only Quiz then it will probably require three passes: select and write
detail data to subfile; calculate subtotals and append to same subfile;
write report. The final pass sorts the subfile records into the correct
sequence and lists the detail record data and then the subtotal data. 

JWP

-----Original Message-----
From: powerh-l-bounces+john.pickering=norbord.com at lists.sowder.com
[mailto:powerh-l-bounces+john.pickering=norbord.com at lists.sowder.com] On
Behalf Of Markus Grossrieder
Sent: Friday, November 12, 2010 8:01 AM
To: powerh-l at lists.sowder.com; Pandurang Rajpurohit
Subject: Re: Subtotal calculation

Hi Pandurang Rajpurohit,

something like this :


;define sort
SORT ON Part_Number, Part_Group

;report detail
REPORT Part_Number, Part_Group, Part_Price

;Part_Group subtotal
FOOTING AT Part_Group &
    "Subtot Part Group", Part_Group, Part_Price SUBTOT

;Part_Number subtotal
FOOTING AT Part_Number &
    "Total Part Number ", Part_Number , Part_Price SUBTOT


Attention: aircode, not sure anymore about the right syntax, it's been
some 
time ... :-)

Regards,
Markus


----- Original Message ----- 
From: "Pandurang Rajpurohit" <pandurang.rajpurohit at in.ibm.com>
To: <powerh-l at lists.sowder.com>
Cc: "Nisha Pawar" <nishapawar12 at gmail.com>
Sent: Friday, November 12, 2010 11:20 AM
Subject: Subtotal calculation


>
>
> Hello Team,
>
> Please suggest as to how to achieve the below example subtotal query.
> Here there are few parts of different groups , and a report is being
> generated which will be shown in the below format.
>
> Now the subtoal is given at the footing line and it has been given
> footing at part number which is the sorting key also.
> Now again i want to subdivide the part group wise subtotal , please
> suggest is this possible in powerhouse.
>
>
>
>
>          Part Number         Part Group        Part Price
>
>                   A 123 300
>        A` 456 400
>        A 123 100
>        A           456                     400
>
>
------------------------------------------------------------------------
---------------------------
>
> Subtotal :   A                 123                     400
>                               456                     800
>
>                   B           123 200
>        B` 456 100
>        B 123 100
>        B           456                     400
>
>
------------------------------------------------------------------------
---------------------------
>
> Subtotal :   B                  123                    300
>                                457        500
>
> (See attached file: Sample calculation.doc)
>
>
> Thanks & Regards
> Pandurang Rajpurohit,
> -----------------------------------------------------------------
> Project Manager
> GM - Powerhouse Tower (DDS)
> IBM Global Services India Pvt. Ltd. Pune
> Land line : +91 020 40116372
> Hand Line : +91 9049009973
> EMAIL : pandurang.rajpurohit at in.ibm.com
>


------------------------------------------------------------------------
--------


> -- 
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l at lists.sowder.com
> Subscribe: 'subscribe' in message body to 
> powerh-l-request at lists.sowder.com
> Unsubscribe: 'unsubscribe &lt;password&gt;' in message body to 
> powerh-l-request at lists.sowder.com
> http://lists.sowder.com/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a
subscriber.
> Add 'site:lists.sowder.com powerh-l' to your search terms to search
the 
> list archive at Google. 

-- 
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: 'subscribe' in message body to
powerh-l-request at lists.sowder.com
Unsubscribe: 'unsubscribe &lt;password&gt;' in message body to
powerh-l-request at lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
Add 'site:lists.sowder.com powerh-l' to your search terms to search the
list archive at Google.



More information about the powerh-l mailing list