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

How do you create a quarterly and yearly report using dates?

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

    How do you create a quarterly and yearly report using dates?

    Greetings,

    How do you create a quarterly and yearly report using dates?

    Regards,

    Pat

    #2
    Re: How do you create a quarterly and yearly report using dates?

    Probably with groups. I would create a global variable on a form, numeric, to allow the user to specify a year

    If you create a group and make it break on the expression

    case(between(month(somedatefield),1,3) .and. year(somedatefield) = var->yearvariable,1,between(month(somedatefield),4,6) .and. year(somedatefield) = var->yearvariable,2,between(month(somedatefield),7,9) .and. year(somedatefield) = var->yearvariable,3,between(month(somedatefield),10,12) .and. year(somedatefield) = var->yearvariable,4)

    And make the report filter

    year(somedatefield) = var->yearfield

    You would get quarterly totals in the group footer and yearly totals in the report footer.
    There can be only one.

    Comment


      #3
      Re: How do you create a quarterly and yearly report using dates?

      There are so many ways to do this.

      I just finished one for my Membership database.

      For me, I just wanted the user to pick a from and to date so I created a form and placed two supercontrol calendars on it.

      I created two global variables... varRptFromDate and varRptToDate

      The two supercontrol calendars are "bound" to these variables.

      I placed a button on the form to run the report.

      In the report itself I specified a filter which filtered the records based on the variables for the dates.

      You could do somewhat the same, but on your form have a dropdown or radio buttons... something that the user can select a quarter or YTD from and maybe a dropdown for the user to select a year from.

      In the code to run your report you'd figure out the specific from and to dates from the choices the user made, set the variables and run the report.

      Like I said, so many ways to do this... this is just one.

      David

      Comment


        #4
        Re: How do you create a quarterly and yearly report using dates?

        You also should specify whether you want this to appear vertically or horizontally on the report....if horizontal, then use calculated fields most likely with or without subreports dependent upon the scenario.
        Mike
        __________________________________________
        It is only when we forget all our learning that we begin to know.
        It's not what you look at that matters, it's what you see.
        Henry David Thoreau
        __________________________________________



        Comment


          #5
          Re: How do you create a quarterly and yearly report using dates?

          Hi Pat,

          Another method of filtering by date.

          If you have a date field in your table, create an ASK variable for the First Date and Last Date. When the report is run a dialog pops up and asks fro the two dates.

          This is done from right mouse click on the bar of the detail section, selecting Properties and the Records Tab.

          See thumbnail.
          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


            #6
            Re: How do you create a quarterly and yearly report using dates?

            Greetings,

            I thank you all for your responses. Would you happen to know if their are any sample files of a quarterly/yearly report that is on this message board that I could look at? Again, thank you.

            Regards,

            Pat

            Comment


              #7
              Re: How do you create a quarterly and yearly report using dates?

              Pat,

              We all like to help when someone is stuck on a routine or some code but, I do think it is time for you to get your hands dirty.

              As shown there are many ways to do what you want, I suggest you have a good play with what has been shown to you so far and test the results.

              You will end with the desired result. What ever you do that works will be a good solution. It may be that another developer would have done it differently and possibly in a more logical way. That really does not matter, if it works the way you want and you have learnt from it then you have got the knowledge go forward.
              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


                #8
                Re: How do you create a quarterly and yearly report using dates?

                I know there are some examples both of what can be done and actual samples of what you want attached to messages.....search the board first for these if a sample is absolutely necessary for you.

                ....and I suggest that if you (or anyone reading) are seriously trying to learn Alpha, especially xbasic, to glean everything you can from the messageboard. There is a wealth of information here with actual samples given.

                I remember just going through the messageboard and downloading every sample I ran across and putting them into my own little help file for future use---literally hundreds of them--took quite a few hours just to grab them. I have done so ever since when someone posts a sample that shows how to do something.....same for text files of code snippets the users here so generously contribute to this knowledgebase.....it sure saves time in the end by mostly only having to search my own files than the messageboard (which is a bit difficult to learn how as well).

                But when you do have a problem that you cannot resolve, definitely ask here---I did not want to deter you or anyone from doing so. :)
                Mike
                __________________________________________
                It is only when we forget all our learning that we begin to know.
                It's not what you look at that matters, it's what you see.
                Henry David Thoreau
                __________________________________________



                Comment


                  #9
                  Re: How do you create a quarterly and yearly report using dates?

                  Hi Keith,

                  Good point and I thank you. I shall give it a whirl tomorrow, and if I get stuck, I hope you do not mind me asking you possible, additional questions. Again, thank you.

                  Regards,

                  Pat



                  Originally posted by Keith Hubert View Post
                  Pat,

                  We all like to help when someone is stuck on a routine or some code but, I do think it is time for you to get your hands dirty.

                  As shown there are many ways to do what you want, I suggest you have a good play with what has been shown to you so far and test the results.

                  You will end with the desired result. What ever you do that works will be a good solution. It may be that another developer would have done it differently and possibly in a more logical way. That really does not matter, if it works the way you want and you have learnt from it then you have got the knowledge go forward.

                  Comment


                    #10
                    Re: How do you create a quarterly and yearly report using dates?

                    Hello MikeC,

                    Thanks for the suggestion. I am sure some time will be needed to review all of the messages, including the ones with samples. If I get stuck on a problem that I cannot resolve, I will ask for help here on this message board. Again, thank you.

                    Regards,

                    Pat



                    Originally posted by MikeC View Post
                    I know there are some examples both of what can be done and actual samples of what you want attached to messages.....search the board first for these if a sample is absolutely necessary for you.

                    ....and I suggest that if you (or anyone reading) are seriously trying to learn Alpha, especially xbasic, to glean everything you can from the messageboard. There is a wealth of information here with actual samples given.

                    I remember just going through the messageboard and downloading every sample I ran across and putting them into my own little help file for future use---literally hundreds of them--took quite a few hours just to grab them. I have done so ever since when someone posts a sample that shows how to do something.....same for text files of code snippets the users here so generously contribute to this knowledgebase.....it sure saves time in the end by mostly only having to search my own files than the messageboard (which is a bit difficult to learn how as well).

                    But when you do have a problem that you cannot resolve, definitely ask here---I did not want to deter you or anyone from doing so. :)

                    Comment


                      #11
                      Re: How do you create a quarterly and yearly report using dates?

                      Hi Keith,

                      I have tried what you have mentioned about the ASK variable, but for some reason it keeps bringing up the other records. The pop-up screen shows up for the First Date/Last Date.

                      That part works, but when I enter the first date of 4/6/2010 and the last date of 4/20/2010 it shows up on the report, but it also shows the other record on the report dated for 6/9/2010 to 6/16/2010.

                      What do I need to do to only show a specific date range on the report? I have attached the ZIP file so you may see the result I get. I thank you for your help.

                      Regards,

                      Pat



                      Originally posted by Keith Hubert View Post
                      Hi Pat,

                      Another method of filtering by date.

                      If you have a date field in your table, create an ASK variable for the First Date and Last Date. When the report is run a dialog pops up and asks fro the two dates.

                      This is done from right mouse click on the bar of the detail section, selecting Properties and the Records Tab.

                      See thumbnail.

                      Comment


                        #12
                        Re: How do you create a quarterly and yearly report using dates?

                        Hey Pat,

                        You have your Ask variables defined in the Order Section.

                        Put them in the Filter section (just above the Order) and I think you want the filter something like this...

                        Code:
                        Start_Date>=Var->askD_Get_First_Date .and. Start_Date <= Var->askD_Get_Last_Date
                        This goes after records with a Start_Date between two input variables.

                        David

                        Comment


                          #13
                          Re: How do you create a quarterly and yearly report using dates?

                          Hi David,

                          I thank you for your help and it worked! I also noticed what I was missing in the string too. Again, thank you.

                          Regards,

                          Pat



                          Originally posted by Davidk View Post
                          Hey Pat,

                          You have your Ask variables defined in the Order Section.

                          Put them in the Filter section (just above the Order) and I think you want the filter something like this...

                          Code:
                          Start_Date>=Var->askD_Get_First_Date .and. Start_Date <= Var->askD_Get_Last_Date
                          This goes after records with a Start_Date between two input variables.

                          David

                          Comment

                          Working...
                          X