Skip to Content
author's profile photo Former Member
Former Member

Running Total in QLD

Hi,

Is there a way in QLD can have a running total like the Crystal Report capabilities? Is this possible in the Repetative Area1.

Example :

DocTotal Drawsum Result

500000 200000 300000

300000 100000 200000

200000 200000 0

The purpose of this is for Cash Advance Monitoring from AP Downpayment Invoice.

Is this possible by running difference / Balance ?

Thank you very much.

Regards,

clint

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 09, 2008 at 02:47 AM

    Query for Running Total

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 09, 2008 at 01:22 AM

    Hi Clint,

    As far as I know, it is not possible. You have to use some other tools like Crystal Report.

    Thanks,

    Gordon

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Gordon,

      Its been 5 days from know thinking how to Monitor the Cash Advances and I have an idea to get it,

      First Total all the Drawsum Column in PCH9 table then deduct or subtract the Cash Advance original amount. Im thinking of searching a running difference query but it seems to hard hard for me.

      Thank you Gordon.

      Regards,

      Clint

  • author's profile photo Former Member
    Former Member
    Posted on Oct 09, 2008 at 01:35 AM

    Would you be able to share your query here. There may be options to do it within the query iteself.

    Try this sample for a concept of what I mentioned above..

    SELECT T0.DocNum AS 'Document Number', T0.DocDate AS 'Posting Date', T0.DocTotal AS 'Document Total', 
    (SELECT SUM(DocTotal) FROM OINV WHERE DocNum <= T0.DocNum) [Running Total]
     FROM  [dbo].[OINV] T0

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Suda,

      this is the data for you to refer :

      CREATE TABLE (

      INT,

      DATETIME,

      NVARCHAR(100),

      NUMERIC(15,2),

      NUMERIC(15,2),

      INT,

      NUMERIC(15,2),

      NUMERIC(15,2),

      NUMERIC(15,2),

      NUMERIC(15,2)

      )

      GO

      /* Data for the `Query_Result` table (Records 1 - 8) */

      INSERT INTO (, , , , , , , , , )

      VALUES (1575, '20080110', N'SAADA PASIGAN', N'0', N'165308.83', 135, N'165308.83', N'500000', N'334691.17', N'334691.17')

      GO

      INSERT INTO (, , , , , , , , , )

      VALUES (1592, '20080111', N'SAADA PASIGAN', N'0', N'79563.6', 135, N'79563.6', N'500000', N'420436.4', N'420436.4')

      GO

      INSERT INTO (, , , , , , , , , )

      VALUES (1599, '20080111', N'SAADA PASIGAN', N'0', N'53102.95', 135, N'53102.95', N'500000', N'446897.05', N'446897.05')

      GO

      INSERT INTO (, , , , , , , , , )

      VALUES (1604, '20080111', N'SAADA PASIGAN', N'0', N'38415.6', 135, N'38415.6', N'500000', N'461584.4', N'461584.4')

      GO

      It compute for the difference of the DocTotal1 and Drawsum, that is correct but I want to have a running diffrence betwenn MIN(Drawsum) only.

      Example from the above data :

      The total Cash Advance is 500000 only. The Drawsum will deduct the 500000 until it become zero. Refer Below :

      Doctotal DrawSum The Remaining Total of 500000

      500000 165308.83 334691.17

      the remaining amt shall be carry on which is the 334691.17 and not the 500000.

      DocTotal DrawSum The Remaining Total of 500000

      334691.17 79563.6 255127.57

      255127.57 53102.95 202024.62

      202024.62 38415.6 163609.2

      and so onn...

      Hope that you got me.

      Thank you.

      Clint

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.