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

Filtering records on subreport in set report

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

    Filtering records on subreport in set report

    Hello everyone,
    A5V8 on Windows XP SP3
    I've been on this issue before but I've lost everything and I'm building it again and got stuck.
    I have a subreport on a report in a set. The set has the primary table which is a customer account, each customer has a 3 character code, 001, 002 etc..
    The subreport covers the work items carried out for each customer each month and has the same 3 character customer code as the linking field. Of course there are lots of records in the 'work' file and some customer codes have several entries for each month.
    My problem is to filter the records from the 'work' table into each customer code account, retrieving the records for the same month as the account and all records for each customer code during that month. The acount has a 'date prepared' field from which the month in question can be calculated.
    At the moment all the months work entries are being drawn onto the account report. So what code do I nuse please and where do I put it?
    Thanks, Trevor.

    #2
    Re: Filtering records on subreport in set report

    Are you asking for something like

    date_prepared = {03/01/2012}

    ? month(date_prepared) = month(date())
    = .T.
    There can be only one.

    Comment


      #3
      Re: Filtering records on subreport in set report

      Hi Stan,
      Thanks, but no. That will help me find which month's records to pull from the 'work' file, but what I need to know is how to retrieve just one customers records for just that one month, from the 'work' table into the subreport on the 'account' set's report.
      For example the account set report might be for customer number 005 (a character field) and the subreport within it would say;

      WORK CARRIED OUT THIS MONTH

      CODE DATE WORK DONE WHAT WAS DONE HOURS SPENT COST
      xxx xx\xx\xxxx unblock drains 1.25 32.00

      This information comes from the 'work' table which has the same customer code (3 characters) and the records that I need to fetch into the subreport need to be only those for that particular customer and for that particular month (the month of that particular account). There may be one record or multiple ones for that customer code in that month. At the moment each customer code's account is displaying all of the month's work (for every customer) in the subreport.
      I hope that this is clearer.
      Thanks again,
      Trevor.

      Comment


        #4
        Re: Filtering records on subreport in set report

        If you filter the report to one customer, only their records should show up in the sub report.
        There can be only one.

        Comment


          #5
          Re: Filtering records on subreport in set report

          Trevor

          What you are describing doesn't make sense to me.

          A subreport should show only the data for a customer if there is a grouping for the customer and the subreport is on the detail section of the report.

          Probably time for a example...
          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


            #6
            Re: Filtering records on subreport in set report

            Here is a lashup of what I want to do and some data to use.

            The accountset12 has a report which has a customer code which is unique to each customer and shows an opening balance from last month, payments received and new balance before the new month's account.
            Then there is a subreport for work from workmar2012. Here the linking field is customer code (cuscode) and I want to show in the subreport all the items of work from the work table for that one customer code, there may be none, there may be several for each code.
            Then the same for bookings012. Again the link is cuscode and I want to show all the bookings with 'Arrive' in the month (say March 2012 for this example) for each individual customer code, again there may be none or 5 if there is an arrival every week in a month that has 5 Thursdays in it.

            At the bottom of each subreport I need a subtotal of all the work (or bookings) for that customer code to add to the other items on the account and give a grand total etc.. Once I know what code I need to do this and where to place it I can flesh out the rest of the account. For customer codes with no work or no bookings in the month, I can enter a 'no work done' or 'no bookings' entry so that the code is still picked up. At the moment I am just using SCANNING("bookings012") etc., and getting all the customer codes' bookings\work.

            Thanks folks.
            Attached Files

            Comment


              #7
              Re: Filtering records on subreport in set report

              Trevor

              Sorry about the delay.

              Unzip these files and add the set to your database.

              Put the files in the same directory and then press the green plus sign to add the set to the db.

              There is a report account_al that is a start of what I think you are looking for.

              add a footer to the subreport, use the genie to make a calculated field subtotal..


              acountset_al.zip
              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


                #8
                Re: Filtering records on subreport in set report

                Thanks very much, Al,
                I've spent some time on it now and I think I've got the hang of it.
                Thanks again,
                Trevor.

                Comment


                  #9
                  Re: Filtering records on subreport in set report

                  Hi Al,
                  Thanks for all your help, my end of month report works well. I'm now having a problem getting the closing carry forward balance, which is a calculated value, into a new (next month's) account table. The final balance calc. value was created at report level and I don't seem to be able to create them now at set level. So what I need is a way of getting the closing balances of the set report into the opening balance of the new table. Before, I used to do this with a 'duplicate' and 'append' but of course I can't do this from a report.
                  Thanks for any help you can give,
                  Trevor.

                  Comment


                    #10
                    Re: Filtering records on subreport in set report

                    Actually reports can do some writing...

                    reportcoding.PNG
                    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


                      #11
                      Re: Filtering records on subreport in set report

                      Thanks, Al.
                      Looks like I need to learn action scripting, never used that before. I'll bury my head in the relevant help section and see what I can do.
                      Trevor.

                      Comment


                        #12
                        Re: Filtering records on subreport in set report

                        Hello Al, I'm sorry but I can't find a category in action scripting that suits the need. I have built the report for end-of-month accounts and it works well, thank you. Before I drop the account table from the set and replace it with next months, I want to copy the new table's opening balance with the old ones closing balance. The closing balance on the report is a calculated field and the opening balance in the new account will be just a number field.
                        Before, I used to copy the whole account table, but without records and then use an operation to append the value of the closing balance to the new account\opening balance.
                        Regards,
                        Trevor.

                        Comment


                          #13
                          Re: Filtering records on subreport in set report

                          send a sample of the working one.
                          and describe where you want the closing total to go

                          Or you might want to try this sort of thing -
                          1 use a summary operation to create a C/F balance table
                          2 That table could become the new one, renamed to start new entries with
                          3 repeat 1 at end of month

                          Comment


                            #14
                            Re: Filtering records on subreport in set report

                            Originally posted by [email protected] View Post
                            Hello Al, I'm sorry but I can't find a category in action scripting that suits the need. I have built the report for end-of-month accounts and it works well, thank you. Before I drop the account table from the set and replace it with next months, I want to copy the new table's opening balance with the old ones closing balance. The closing balance on the report is a calculated field and the opening balance in the new account will be just a number field.
                            Before, I used to copy the whole account table, but without records and then use an operation to append the value of the closing balance to the new account\opening balance.
                            Regards,
                            Trevor.
                            The xbasic change record is what I was considering.
                            xbasicchangerecord.PNG
                            Ray's suggestion 1 sounds like another idea too..
                            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


                              #15
                              Re: Filtering records on subreport in set report

                              Thank you both for your replies, they are appreciated. I'll send the database when I get back from holiday next week. I'll also try to get to grips with the two suggestions that you have made. The problem here is really me! I'm not an alpha 5 student although I've been using A5 since the V4 days. I just bought it as a means to an end to run my small office, learned only enough until it worked and then that was that. I started to build the three main tables into a set just recently so that I could quickly end up with a report that I could send out by email (when I started with V4 98% of our customers hadn't heard of email)! So I'm 3\4 of the way there, just need a little more help please.
                              Thanks again,
                              Trevor.

                              Comment

                              Working...
                              X