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

Help - Report on Child? Intersect?

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

    Help - Report on Child? Intersect?

    I have reports for sets that work well, but today I had need to have a report of ALL the transaction based on a filter. I want to filter for purchasers of Widgets and also see wha else thay bought.
    Here is what I want!

    Name address
    01/01/1999 2 widgets $20
    02/03/1999 4 Cats $40
    03/01/2000 1 widget $10
    04/02/2000 2 Cats 20
    01/03/2001 4 Mice $5

    What I get in the report is only the Widgets. ( I know the filter is asking Widget so that is what I get.) How do I create a report, or filter, or seires of operations, that gets me a list of everything.
    Thanks for any suggestions.
    Nello

    #2
    RE: Help - Report on Child? Intersect?

    There are probably several ways of doing this.

    I would consider creating an inverted set. Put the purchases table in the parent slot, and the customer table in the child slot, linked one to one.

    Group report on customer id found in the parent table.

    Put the name and address in the group header.

    Put the purchases in the details band of the group.

    Order records based on customer id + purchase date.

    this ought to get you going... if you need to subtotal like items you may need to use a new calc/summary field...

    -- tom

    Comment


      #3
      RE: Help - Report on Child? Intersect?


      Thanks for the reply. The report layout you descibe is what I have. If I run the report on the IdNum or Customer name I get the report I want. But when I filter on Widgets all that reports is the widgets they bought. What I want is to filter on widgets and get a report of All PURCHASES for anyone who bought Widgets.
      What am i missing?
      Nello

      Comment


        #4
        RE: Help - Report on Child? Intersect?

        Nello:

        What are your tables and how do you have them assembled into sets?

        Bill
        Bill Hanigsberg

        Comment


          #5
          RE: Help - Report on Child? Intersect?

          The tables are Customer, Transactions. I have a set CustomerTransaction and a set TransactionCustomer. I have run reports in both directions. When I filter for Widget I get purchases of widgets.

          I do not feel there is a problem with the report structure or the set. The result I am getting is normal and logical. I just can't figure out how to get what I want, which is a list of ALL THE PURCHASES of everyone who bought Widgets. In other words if they bought widgets what else did they buy.

          Is this an OPERATION procedure?
          Thanks
          Nello

          Comment


            #6
            RE: Help - Report on Child? Intersect?

            Sorry, your goal was not understood from your original question.

            I'm still not sure I understand what you are striving for, but while I'm often wrong, I'm never in doubt!

            If you want a report that lists only customers who bought widgets, but shows all their purchases (not just widgets), consider changing the filter in the report to 'marked' customers.

            Then,
            1) unmark all customers
            2) mark just customers who bought widgets
            3) run the report

            Comment


              #7
              RE: Help - Report on Child? Intersect?

              Tom,
              There is no doubt, you decoded my message correctly! That is exactly what I want.

              Now, Unravel this for me, if you will.

              How do I mark the customer record of a set when filtering on the transaction data?

              I am baffled! I've made several attempts.
              Starting from the inverted set I "mark" the records using the "widget" filter. If I run a reoport on "marked" I only get the Widgets customers with out other purchases.

              So I think to myself,"do something" to mark the parent record with corresponding IDNUMBER. Then run the report on the marked records. BUT I do not now how to "do Something" -- that is mark the parents.
              Any suggestions are appreciated.
              Nello

              Comment


                #8
                RE: Help - Report on Child? Intersect?

                Nello, the attached database illustrates two ways to solve the puzzle.

                The database has two tables, customers and purchases. It's based on a hypothetical sports shop, where customers buy various kinds of sporting goods.

                Customers are linked to purchases by their id number.

                The global script, MarkBatsCustomers shows one approach to marking just those customers who bought bats.

                The operation 'MarkBatsCustomers' does the same thing, but would require you to un the operation 'UnmarkAllCustomers' first.

                In each case the customers who bought bats are found by using the exist() method. The trick is to figure out how to identify both customers and their products. I solved it by using a compound index key, in the Purchases table, based on their id and the product.

                I think this will be directly applicable to your situation.

                Comment


                  #9
                  RE: Help - Report on Child? Intersect?

                  Nello, here's a revised version, which now includes a more general script, 'MarkCustomersByProduct'.

                  Ui_get_text() is used to get product name from user.
                  Product Name is stored in variable.
                  Variable is used to find and mark Customers.

                  This will be of more general use to you, I would imagine.

                  -- tom

                  Comment


                    #10
                    RE: Help - Report on Child? Intersect?

                    Oops. Too quick on the Send Message. Here's the attachment with the revised version.

                    Comment


                      #11
                      RE: Help - Report on Child? Intersect?

                      Hi Tom,

                      I just worked through your sample. I must say it's a useful one. It really shows what you can do if you think about how to index a child table. And of course it defines another approach to sorting a set's parent records on the properties of the child records (in which you know I have an interest).

                      So we all owe you for this one.


                      And.....you wrote:
                      "I'm often wrong, I'm never in doubt!"

                      Why didn't you look in on me when you visited Dawson College. You've obviouly met a few of my colleagues.

                      All the best,
                      Bill
                      Bill Hanigsberg

                      Comment


                        #12
                        RE: Help - Report on Child? Intersect?

                        Tom's excellent solution also gives a hint at something else. In a relational database one could argue that the customer ID should only be on an invoice header. In theory this is true, however, disk space is cheap, and throwing a customer ID on a line item which also has the item information, makes a number of things much easier later on. Another way to do what Tom did would be to create a saved summary operation that asks for item (bat etc) and summarizes the line items by cust id. A set linking the line items "one to one" to the summarized table could be created and the report would be filtered on something like SummaryCustomer->id's that are not blank.

                        Comment


                          #13
                          RE: Help - Report on Child? Intersect?

                          John:

                          I take your point about normalization (and cheap storage) but in Nello's specific case isn't customer_id necessary in the items table as a linking key?

                          Or have I once again missed something?

                          Bill
                          Bill Hanigsberg

                          Comment


                            #14
                            RE: Help - Report on Child? Intersect?

                            Bill,
                            You did not miss anything. I was basing my thoughts on the traditional layout of an invoicing program. Invoice Header table with an invoice # and customer ID which is usually linked "one to one" to a customer table. Invoice line items are usually linked "one to many" to the invoice header via an invoice number. Normalization would suggest carrying the customer ID on the header only and not on the line items. My thinking was that certain Alpha functions (indexing for one) can only be done on fields from a single table , and that carrying information in several places can sometimes make future tasks less complicated. An example would be a browse for all invoice line item sales history with a "find by key" for customers. You could certainly make a set linking the line items "one to one" to the invoice header and do a query on the customer ID residing there, but a "find by key" would probably be considerably quicker.
                            John

                            Comment


                              #15
                              RE: Help - Report on Child? Intersect?

                              John,

                              I agree with everything that you say.

                              In our MIS department we have some very experienced people who manage our student records system. They sometimes overload a file with extra field(s) containing concatenated key values which they index. They do this to increase the speed of searches and sorts performed on this enormous archive.

                              It's not that they do not understand normalization and the reasons for it. They just optimize a few processes they have to run all the time. I try to learn by watching them.

                              Thanks for sharing your knowledge.

                              Bill
                              Bill Hanigsberg

                              Comment

                              Working...
                              X