Options

Running Totals on Forms

DarrenBezzantDarrenBezzant Member Posts: 13
edited 2000-06-08 in Navision Financials
OK. Here's what I would like to do. On the Sales Invoice Form, the client would like to see running totals for Amounts and Prices, for Example. I created the Flow Fields on the Sales Line Table pointing to the Appropriate Fields.

I understand that I cannot put the running Totals on the Sales Invoice Main Form, since the Field will not be updated on a run-time basis. So, I expanded the Sub Form area and added the Flow Field Control.

Problem: When I run the Sales Invoice the Sub Form Grid expands to fill the entire area, not showing the New Control that I have Added.

In Short <img border="0" title="" alt="" src="images/smiles/icon_smile.gif" /> what am I missing? or is there an easier way to generate and display running Totals?

Cheers


Darren Bezzant NCPS, NCSD
Central Software
Ludlow, NB, CANADA
dbz@nb.aibn.com
Darren Bezzant NCPS, NCSD
Bell Business Solutions
Calgary, NB, CANADA
darren.bezzant@bell.ca

Comments

  • Options
    Mr_David_CoxMr_David_Cox Member Posts: 15
    HorzGlue and VertGlue

    On the Table box
    Try Top and Both!




    MindSource(UK)Limited
    Navision Service Partner
    info@mindsource.co.uk
    www.mindsource.co.uk
    MindSource(UK)Limited
    Navision Service Partner
    info@mindsource.co.uk
    www.mindsource.co.uk
  • Options
    DarrenBezzantDarrenBezzant Member Posts: 13
    OK, Top worked, new Problem:

    When I am on a Blank Sales Line Record, The Flow Field Resets to 0.00, when the cursor is on a populated line, it works fine (so far).

    Is there a way around this?

    Cheers

    Darren Bezzant NCPS, NCSD
    Central Software
    Ludlow, NB, CANADA
    dbz@nb.aibn.com
    Darren Bezzant NCPS, NCSD
    Bell Business Solutions
    Calgary, NB, CANADA
    darren.bezzant@bell.ca
  • Options
    Tarek_DemiatiTarek_Demiati Member Posts: 112
    Have you tried to set the blankzero property to Yes ?

    tarek_demiati@ureach.com


    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by DarrenBezzant:
    OK, Top worked, new Problem:

    When I am on a Blank Sales Line Record, The Flow Field Resets to 0.00, when the cursor is on a populated line, it works fine (so far).

    Is there a way around this?

    Cheers

    <HR></BLOCKQUOTE>
  • Options
    DarrenBezzantDarrenBezzant Member Posts: 13
    I thought of that but What I would like to see in that field is the total of all lines in the Sales Invoice. I don't think that I can do this with a Flow Field since there really isn't a record created on a blank line

    Any Ideas?
    Darren Bezzant NCPS, NCSD
    Bell Business Solutions
    Calgary, NB, CANADA
    darren.bezzant@bell.ca
  • Options
    Tarek_DemiatiTarek_Demiati Member Posts: 112
    I think that I've not fully understood your problem and what you're trying to achieve.

    From your Sales Document press F9 (Statistics) maybe the flowfields you requires are already there ...

    tarek_demiati@ureach.com
  • Options
    DarrenBezzantDarrenBezzant Member Posts: 13
    What I am trying to Achieve is a modified Sales INvoice Screen that will show the end-user the Running Total of what they have entered. If they Modify the Quantity or the Unit Price, the Running Totals will be automatically recalculated. Similarly if they enter another item line this will update the totals as well.



    Darren Bezzant NCPS, NCSD
    Central Software
    Ludlow, NB, CANADA
    dbz@nb.aibn.com
    Darren Bezzant NCPS, NCSD
    Bell Business Solutions
    Calgary, NB, CANADA
    darren.bezzant@bell.ca
  • Options
    John_TegelaarJohn_Tegelaar Member Posts: 159
    You need to force an update of your flowfield. In the form you need to add Calcfields("Running total") to the OnNewRecord trigger (keeps the total visible when moving to a new line), and in the table you have to add the same instruction to the OnInsert trigger. Depending on what you do after selecting type and item, you may need to add a few more calcfields instructions.

    John
  • Options
    Tarek_DemiatiTarek_Demiati Member Posts: 112
    Try this on the OnTimer() trigger of your form :

    SELECTLATESTVERSION;
    CALCFIELDS(YourField);
    CURRFORM.UPDATE(FALSE);

    Set the TimeInterval Property of the form so it fires up
    the OnTimer() property every seconds.

    I have not tried it but it might work, let me know the result
    of your experimentation, thanks.

    tarek_demiati@ureach.com

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by DarrenBezzant:
    What I am trying to Achieve is a modified Sales INvoice Screen that will show the end-user the Running Total of what they have entered. If they Modify the Quantity or the Unit Price, the Running Totals will be automatically recalculated. Similarly if they enter another item line this will update the totals as well.

    <HR></BLOCKQUOTE>
  • Options
    Mr_David_CoxMr_David_Cox Member Posts: 15
    Look at the General Journal form that has a running total and a balance.

    You should be able to restucture that code to give you a Balance as well as a running balance.

    Tip:
    Always look at the existing Navision Objects for the Solutions first.


    MindSource(UK)Limited
    Navision Service Partner
    info@mindsource.co.uk www.mindsource.co.uk

    [This message has been edited by Mr David Cox (edited 08-06-2000).]
    MindSource(UK)Limited
    Navision Service Partner
    info@mindsource.co.uk
    www.mindsource.co.uk
  • Options
    Tarek_DemiatiTarek_Demiati Member Posts: 112
    Hi Dave,

    I agree with the tip <img border="0" title="" alt="" src="images/smiles/icon_smile.gif" />

    However a Sales Invoice document consist of a main form
    and a subform. So getting figures to update automatically on the Sales Header when your entering Sales Lines is not as straight forward as on the General Journal form which consits of one table and one form

    tarek_demiati@ureach.com
  • Options
    Mr_David_CoxMr_David_Cox Member Posts: 15
    Hi Tarek

    As I understand it the Running totals are on the subform not the header.

    Thus the VertGlue and HorzGlue answer above!

    Regards


    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Tarek Demiati:
    Hi Dave,

    I agree with the tip <img border="0" title="" alt="" src="images/smiles/icon_smile.gif" />

    However a Sales Invoice document consist of a main form
    and a subform. So getting figures to update automatically on the Sales Header when your entering Sales Lines is not as straight forward as on the General Journal form which consits of one table and one form

    tarek_demiati@ureach.com
    <HR></BLOCKQUOTE>



    MindSource(UK)Limited
    Navision Service Partner
    info@mindsource.co.uk
    www.mindsource.co.uk
    MindSource(UK)Limited
    Navision Service Partner
    info@mindsource.co.uk
    www.mindsource.co.uk
  • Options
    DarrenBezzantDarrenBezzant Member Posts: 13
    Yes it was. The other problem I had of being on a new line was solved by comparing the rec versus the xrec. If the rec was 0 then display the xrec for that flow field.

    Cheers
    Darren Bezzant NCPS, NCSD
    Bell Business Solutions
    Calgary, NB, CANADA
    darren.bezzant@bell.ca
Sign In or Register to comment.