Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Running Balance Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Running Balance Help

    I'm stuck creating a report with a running balance.

    I have a table = "Charges" with fields for Cientid; ChgDate; Payment; and Charge. I need the running balance for each date.

    This for a report grouped on ClientID

    TIA,

    Tom

    #2
    Re: Running Balance Help

    Making sure I understand.

    You want a running balance resetting to zero at the beginning of each group of clientid's showing you the running total of payments for each date appearing in the group? You don't want to place a date group level inside the clientid grouping?
    There can be only one.

    Comment


      #3
      Re: Running Balance Help

      Stan - I think I got it.

      In reports, I can simply drag a Calc Field to the detail, and check Running total.

      I'm checking to be sure it captures ALL previous balance due.

      I'll let you know if it doesn't test out.

      Thanks for taking a look.

      ~ Tom

      Comment


        #4
        Re: Running Balance Help

        Guess I don't "Got it"!

        Stan, resetting to zero for each the beginning of each group. I'll use a date range of between(chgdate,1/1/1111, varDate). I could group on date if that makes it any easier. So I need the total charges - total payments for each ChgDate.

        Thanks,

        ~ Tom

        Comment


          #5
          Re: Running Balance Help

          I think if you add the date grouping and use the same procedure of drag dropping the genie will create the proper expression. The run_total() function used needs the grouping level to do what you want.

          RUN_TOTAL( Expression as A [, Group as G [, Sub_Group as G ]] )

          sub_group - When to reset the value produced by the function to 0 (instead at the end of all records).
          There can be only one.

          Comment


            #6
            Re: Running Balance Help

            So that's why a sub_group is needed...makes sense!

            It continues to amaze me that so many of the things I do in Alpha I don't understand why they do what they do.
            Robin

            Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

            Comment


              #7
              Re: Running Balance Help

              I don't get it! But I'll give it a try tomorrow.

              ~ Tom

              Comment


                #8
                Re: Running Balance Help

                I am having a similar problem. I have a Run_Total calculated field that I need to set up for a group, but I cannot get the syntax right. I tried run_total(debit-credit), which works fine for the first group, but it keeps a running total throughout the report. I just can't get it to reset for subsequent groups. I've tried entering it as run_total(debit-credit[,id_num]), and other combinations, but nothing seems to fit the syntax when I try to add the group name, which is id_num. Any help would be greatly appreciated.

                Comment


                  #9
                  Re: Running Balance Help

                  The brackets in the syntax explanation indicate optional parameters and don't get included in actual usage.

                  If you have a group id_num the usage will probably be

                  run_total(debit-credit,grp->id_num)
                  There can be only one.

                  Comment


                    #10
                    Re: Running Balance Help

                    Hi Stan, thanks for getting back to me so quickly. I put in the parameters like you have them above, but I still have an invalid or incomplete expression error. The calculated field that uses run_total is in the detail section of the report. The report only has one group, Id_num. This should be correct, shouldn't it? I'm using version 11 if that makes a difference.

                    Comment


                      #11
                      Re: Running Balance Help

                      It's hard to diagnose without a sample.

                      Open the AlphaSports sample database, open the the Invoice report in design mode, create a calculated field

                      rt = run_total(Invoice_Items->Price*Invoice_Items->Quantity,GRP->Invoice_number)

                      and drag it into the detail section and preview.

                      I have verified that it works. That should give you something to use for comparison to what you are attempting.

                      Note: My example uses Invoice_Items-> to preface the field names because those fields are in child tables of the invoice set and that syntax is required for child table fields.
                      Last edited by Stan Mathews; 10-13-2017, 08:37 AM.
                      There can be only one.

                      Comment


                        #12
                        Re: Running Balance Help

                        I tried the AlphaSports sample, and it worked just fine, but when I attempt to duplicate the same syntax (with appropriate names for database and group of course), I still get invalid or incomplete expression error. Here is what I have entered. The calculated field is called New_Balance, the table is called Transactions and the group is called Id_num: run_total(Transactions->Debit-Transactions->Credit,GRP->Id_num)

                        Comment


                          #13
                          Re: Running Balance Help

                          This is a report based on a single table?

                          Duplicate the table. In the duplicate table obscure any sensitive data. In the control panel, right click on the duplicate table name and choose Zip.

                          Reply to this post, Click the Go Advanced button, attach the zip you created. We'll have to see the actual implementation for further diagnosis.
                          There can be only one.

                          Comment


                            #14
                            Re: Running Balance Help

                            Here is the table. Thanks for your help.
                            Attached Files

                            Comment


                              #15
                              Re: Running Balance Help

                              Unless I am missing something the expression

                              run_total(Debit-Credit,GRP->Id_num)

                              works fine here, no errors.

                              Transdupe1.zip
                              There can be only one.

                              Comment

                              Working...
                              X