AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • In-Person Gatherings
    • Power BI Workshop
    • Podcast
    • Rolodex
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Acumatica Report De...
Running Total
 
Notifications
Clear all

Questions Running Total

 
Acumatica Report Designer
Last Post by SQLRunner 7 years ago
5 Posts
2 Users
1 Reactions
5,836 Views
RSS
SQLRunner
Posts: 45
 SQLRunner
Topic starter
October 2, 2018 1:07 pm
(@sqlrunner)
Trusted Member
Joined: 8 years ago

Anyone know if there is an easy way to do a running total in report designer?  It is such a common request, I'm kind of hoping that there is.   I currently get around it by implementing things such as the below code snippet in custom views and passing it to the report designer.  However, using views are slow in some circumstances and its easier to just bring the tables together.

tt.JobValue - sum(tt.FundedAmount)  OVER (PARTITION BY tt.JPMBillingRuleID)  ->Too easy with standard SQL.

I want to avoid the hard way which involves over complicated table joins, that turn into a mess the more running totals you implement.  I have one report for example with 8 distinct running totals that occur over a couple different tables over a couple different partitions.  Translating that into Joins would create one nasty looking query.


4 Replies
Tim Rodman
Posts: 3199
 Tim Rodman
Admin
October 8, 2018 1:25 pm
(@timrodman)
Famed Member
Joined: 10 years ago

This would be a perfect situation for a Variable. Just keep adding the Variable to itself.


Reply
SQLRunner
 SQLRunner
(@sqlrunner)
Joined: 8 years ago

Trusted Member
Posts: 45
November 4, 2018 2:54 am
Reply toTim RodmanTim Rodman

So I spent a bit of time on this.  In most languages, the "=" would be an assignment operator.  However, in report designer, it appears to function as a comparison only.  In the expression editor $test = $test + [NewInvoiceBurnRate.Cumulative_Billing_EAC_Funding] does not work.  So how do you add the variable back to itself to create a running total.  Unfortunately, google brings me back my own question as a top result lol.  


Reply
Tim Rodman
Posts: 3199
 Tim Rodman
Admin
November 7, 2018 7:32 am
(@timrodman)
Famed Member
Joined: 10 years ago

Take a look at the out-of-the-box Invoice form. There is an example of a formula in detailSection1 that I think is what you are looking for:

=Assign( '$LineNbr', $LineNbr + 1)


Reply
SQLRunner
Posts: 45
 SQLRunner
Topic starter
November 7, 2018 9:50 am
(@sqlrunner)
Trusted Member
Joined: 8 years ago

Hi Tim,

I think I figured this out.  It seemed a bit awkward, I managed to find a single stack overflow response that indicated the process.  It appears that you have to create the variable in a header section.  Then you create another variable with the same name in the detail section.  I see the assign function in your screenshot and will also look into simply using that.  If that works the way I hope, will be much better then creating two variables every time you need one.  I also noticed it seemed that you can not use variables in charts that exist in the group footer.  But, maybe use of the assign function will fix that.


Reply
Tim Rodman reacted
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,528 Topics
  • 10.9 K Posts
  • 12 Online
  • 2,412 Members
Our newest member: Peter Paasch
Latest Post: Tax on Inventory Transfer
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

 No online members at the moment

Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright © 2026 · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×