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

suggestions on creating an aging report?

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

    suggestions on creating an aging report?

    Yes I am new to Alpha software and I am trying to write my first desktop application in version 10.5 to create an aging report for open invoices. In searching thru the date fuctions that are currently availble I am not finding anything already written to accomplish this task. I was hoping to get suggestions or guidance on how to separate the "current" from the 30, 60, 90 and 120 day totals. Is there an easy way or should I just work on writing my own function to handle this? Also I have heard that there is a mentors program but I have not been able to find out any details or info about the program. If anyone can shed any light on that as well it would be greatly appreciated.

    A struggling newbie
    Ed

    #2
    Re: suggestions on creating an aging report?

    Hi Ed,
    I was hoping to get suggestions or guidance on how to separate the "current" from the 30, 60, 90 and 120 day totals. Is there an easy way or should I just work on writing my own function to handle this?
    There is no easy way that I know of. I did work on such a report in C Basic many moons ago so would be pleased to give you a hand.

    Let me where you are up to so far.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

    Comment


      #3
      Re: suggestions on creating an aging report?

      It's a relatively simple thing to achieve. You need calculated field for each age category - for example for invoices in the 30-60 day range the calculation would be if(date()-invoice_date>30 .and. date()-Invoice_date<60,value_of_invoice,0). On the report set the format for each calculate field to be blank if zero. Arrange your calculated fields in neat columns and summarize the totals at the foot of the report.
      Bob
      Bob Whitaker

      Comment


        #4
        Re: suggestions on creating an aging report?

        Bob,
        This need to be done through xbasic code using loop or there is a one line summarize operation. I use dbf table of Alpha.

        Comment


          #5
          Re: suggestions on creating an aging report?

          No it can all be done in the report designer by creating calculated fields.

          Supposing your dbf table contains a field with the invoice date - lets call it Invdate and a field with the invoice amount lets call that Invamount then if you want an ageing report that shows the following age categories
          Less than 30 days
          30 - 60 days
          60 - 90 days
          Over 90 days

          You need to create 4 calculated fields thus

          lessthan30 = if((date()-invdate)<=30,invamount,0) in other words if the invoice date is less than or equal to30 days from the current date the value of this calculated field would be the invoice amount if not then the value is zero
          days30to60 = if((date()-invdate)>30 .and. (date()-Invdate)<=60,invamount,0)
          days60to90 = if((date()-invdate)>60 .and. (date()-Invdate)<=90,invamount,0)
          over90 = if((date()-invdate)>90,invamount,0)

          Then each line of the report would have the following

          Customer Invoice Number Invdate calc->lessthan30 calc->days30to60 calc->days60to90 calc->over90

          In the properties for each of the calculate fields set the format to be "blank if zero"

          At the foot of the report you can drag each of the calculate fields and set the format to show the total of each field

          Hope that helps - if you are still struggling send me a private message if you wish.

          Bob
          Bob Whitaker

          Comment


            #6
            Re: suggestions on creating an aging report?

            Bob,

            Thankyou verymuch for that detail reply.

            What if I need to have only a summary report, against each customer one row & 5 columns as below
            Ac_code <=30 31-60 61-90 >90 Total
            --------- ------- ------ ------ ------ ------
            A1 100 200 300
            A2 200 150 100 450

            Comment


              #7
              Re: suggestions on creating an aging report?

              An easy way to do the summary report is to base the report on a summary table.

              You can easily build the summary table using a batch summarize operation that sums the invoice amounts over a range of dates that are specified by a condition expression. You'd sum the same field (invoice amount) several times, using different date range conditions each time. This would all be in the same summarize operation, and would not have to be run separately for each date range.

              Comment


                #8
                Re: suggestions on creating an aging report?

                Tom's suggestion would work fine but a quicker and simpler method would be to put a group break based on the account number in the report.
                Summarize the totals for each group in the group footer and once you are happy with the accuracy of the results switch off the detail section of the report and just show the summary totals for each group / account number.
                Bob
                Bob Whitaker

                Comment


                  #9
                  Re: suggestions on creating an aging report?

                  Originally posted by Bob Whitaker View Post
                  Tom's suggestion would work fine but a quicker and simpler method would be to put a group break based on the account number in the report.
                  Summarize the totals for each group in the group footer and once you are happy with the accuracy of the results switch off the detail section of the report and just show the summary totals for each group / account number.
                  Bob
                  Bob and Tom's options are both good options.

                  I would add to Bob's in that a conditional object in the detail section could hold all of the fields in the detail section and be turned on and off with a variable .

                  This allows the same report to produce a detail or summary report with the flick of a switch...

                  Another option is to pre-summarize the data to the levels you would drill to and use a report drill down or browse drill down to see more detail of data...

                  There are certainly a world of options..
                  Al Buchholz
                  Bookwood Systems, LTD
                  Weekly QReportBuilder Webinars Thursday 1 pm CST

                  Occam's Razor - KISS
                  Normalize till it hurts - De-normalize till it works.
                  Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                  When we triage a problem it is much easier to read sample systems than to read a mind.
                  "Make it as simple as possible, but not simpler."
                  Albert Einstein

                  http://www.iadn.com/images/media/iadn_member.png

                  Comment


                    #10
                    Re: suggestions on creating an aging report?

                    Tom,
                    I tried this method , but struck in doing for different period as I could not do summarize with multiple condition (filter).!
                    Pls help

                    Comment


                      #11
                      Re: suggestions on creating an aging report?

                      Attached is a structure of the aged_inv and invoiceflow dbf table
                      Renny, it's in the book xbasic 4 every 1 by Peter Wayne,
                      have modified some and came out with this code
                      'Date Created: 07-Apr-2012 08:35:51 PM
                      'Last Updated: 23-Apr-2012 04:22:53 PM
                      'Created By : ALPHA
                      'Updated By : ALPHA
                      option strict
                      dim invoice as p
                      dim aged as p
                      dim age as n
                      dim inv_date as d
                      dim query.order as c
                      dim query.description as c
                      dim query.options as c
                      dim query.filter as c

                      aged = table.open("aged_inv",FILE_RW_EXCLUSIVE)
                      aged.zap(.t.)
                      aged.close()
                      aged = table.open("aged_inv",FILE_RW_SHARED)
                      invoice = table.open("invoiceflow",FILE_RO_SHARED)
                      query.description="Balances greater than 0"
                      query.order=""
                      query.options=""
                      query.filter="Inv_Bal > 0.01"
                      invoice.query_create()

                      invoice.fetch_first()
                      while .not. invoice.fetch_eof()
                      aged.enter_begin()
                      age = date() - invoice.due_date
                      select
                      case age >=90
                      aged.ninety = invoice.inv_bal
                      case age >=60
                      aged.sixty = invoice.inv_bal
                      case age >=30
                      aged.thirty = invoice.inv_bal
                      case else
                      aged.current = invoice.inv_bal
                      end select
                      aged.inv_no = invoice.refnum
                      aged.custid = invoice.custid
                      aged.due_date=invoice.due_date
                      aged.enter_end(.t.)
                      invoice.fetch_next()
                      end while
                      invoice.close()
                      aged.close()
                      preview_report("aging_report")
                      end
                      Attached Files
                      Last edited by JetLi; 04-27-2012, 09:09 AM.

                      Comment


                        #12
                        Re: suggestions on creating an aging report?

                        Renny, I took a closer look at this after your post, and find, much to my embarrassment, that you're correct. The summarize operation doesn't support multiple condition expressions based on the same field. Mea Culpa.

                        -- tom

                        Comment


                          #13
                          Re: suggestions on creating an aging report?

                          Thankyou Bob,
                          I was really breaking my head for a day. With your suggestions I could almost achieve my target. And as Alan noted correctly, I can have a drill down with the same report.
                          Thank you all.
                          Renny

                          Comment


                            #14
                            Re: suggestions on creating an aging report?

                            What is the xbasic command to print only the group total?

                            Comment


                              #15
                              Re: suggestions on creating an aging report?

                              Originally posted by Al Buchholz View Post
                              I would add to Bob's in that a conditional object in the detail section could hold all of the fields in the detail section and be turned on and off with a variable .

                              This allows the same report to produce a detail or summary report with the flick of a switch...
                              Originally posted by jacobr View Post
                              What is the xbasic command to print only the group total?
                              as previously mentioned....
                              Al Buchholz
                              Bookwood Systems, LTD
                              Weekly QReportBuilder Webinars Thursday 1 pm CST

                              Occam's Razor - KISS
                              Normalize till it hurts - De-normalize till it works.
                              Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                              When we triage a problem it is much easier to read sample systems than to read a mind.
                              "Make it as simple as possible, but not simpler."
                              Albert Einstein

                              http://www.iadn.com/images/media/iadn_member.png

                              Comment

                              Working...
                              X