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

Web View one to many (cartesian product)

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

    Web View one to many (cartesian product)

    I want to use a grid in the web which is based on a VIEW. This view is based on a one to may relationship. (Basically a cartesian product)

    1 Header can have several sub lines.. But I want to display them as lines in ONE grid. Not 2 grids linked toegether. This can be done if I could connect to a SQL database . Just define the view there and use the view in the grid. But not using DBF files.

    In Alpha you have SETS: but you cannot use this in the web environment.
    You also have MAPPED TABLES, but unfortunately these only support ONE to ONE relationships.

    So I do not see a possiblity to solve the issue using Alpha with DBF tables.
    But I am hoping somebody sees a solution..

    See also thread:
    http://msgboard.alphasoftware.com/al...d.php?p=471390

    regards, Ron

    #2
    Re: Web View one to many (cartesian product)

    Ron,

    If you have a view of say customer as the parent and charges as the child, and custname, custid and custphone are in the parent, and then say prodname, amount, and units are in the child, you can set up a grid with the 1st 3 columns of each line coming from the parent, and the next 3 columns coming from the child. So, the column headings would be custname, custid, custphone, prodname, amount, and units, and each line would be a record from the child, witjh the 1st 3 columns getting its data from the parent.

    Is this what you mean?

    Gary
    Gary S. Traub, Ph.D.

    Comment


      #3
      Re: Web View one to many (cartesian product)

      In the A5 web for a one - to - many linkage you can use the grid linker.

      But I'm not sure that will provide the answer for you.

      Take one step back and explain what you are doing with the cartesian product. There may be another way to solve the problem.
      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


        #4
        Re: Web View one to many (cartesian product)

        Al, thanks you, but I would like to display it in ONE grid as opposed to the gridlinker which displays two grids linked together.

        Gary, Yes that is what I mean. Now I hope you have a solution for that.

        You say: "you can set up a grid with the 1st 3 columns of each line coming from the parent, and the next 3 columns coming from the child. So, the column headings would be custname, custid, custphone, prodname, amount, and units, and each line would be a record from the child, witjh the 1st 3 columns getting its data from the parent."

        But how would you do that; Step by step, please?


        regards, Ron
        Last edited by rleunis; 09-25-2008, 08:38 AM.

        Comment


          #5
          Re: Web View one to many (cartesian product)

          Hi Ron,

          Actually, I do that a lot. I should habve pointed out that you should flip the tables, i.e, in your view, make charges the parent and customer the child. Then the grid will show all the records of the charges table, and the parent fields will be available for display on each line.

          Gary
          Gary S. Traub, Ph.D.

          Comment


            #6
            Re: Web View one to many (cartesian product)

            and the parent fields will be available for display on each line.


            This should say "and the CUSTOMER fileds ..."
            Gary S. Traub, Ph.D.

            Comment


              #7
              Re: Web View one to many (cartesian product)

              Gary,

              But But how would you do that; Step by step, please?
              Would you define a Mapped Table?

              You can only adress ONE table in a grid. Please let me know, step by step. regards, Ron

              Comment


                #8
                Re: Web View one to many (cartesian product)

                But But how would you do that; Step by step, please?
                Would you define a Mapped Table?

                You can only adress ONE table in a grid. Please let me know, step by step. regards, Ron


                Ron,

                No mapped table would be needed.

                You can address more than one table in a Grid - You started the thread stating that you want to use a View. A View allows you to specify relationships between tables, much like a set. It defines a one to one relationship, true. But the key in what I described above is to flip the tables. Think of this way: If you did not use a view, and based the grid on just the charges table, your grid would show all the charges. Or you could even filter the grid (with an argument based on a session variable perhaps) and just show all the charges for a particular customer or for a particular date or whatever you want. Now the only thing missing from this would be that you want the first few columns to contain data that is not in the charges table, it is in the customer table. You could create calculated fields based on lookup() and pull in the data that way. Or you could use a view, set up with charges as the parent and customer as the child. If you use the view:

                1. Go to the query tab, and select the View option in the radio button.

                2. Define the tables to include in the view, i.e. first add the charges table, and then add the customer table.

                3. In the Link properties of the customer (child) table, leave the defaults but the last 2 fields, regarding the link expression should be the common field from each table that you are linking them by - probably something like custid.

                4. Now click on the Fields in View button, and on the left you will see a drop down that displays the charges table with its fields. Select the fields you want from the charges table. After that, clik on the drop down, and select the customer table. Now the fields from the customer table will show. Select the fields from the customer table. Now you have defined the fields that you will display on the grid, drawn from TWO TABLES.

                5. Now go to the Fields tab, and the fields that you just defined in the Fields in View section (step 4) will show as Available fields. Select all of these.

                Save the grid, and voila!

                Gary
                Gary S. Traub, Ph.D.

                Comment


                  #9
                  Re: Web View one to many (cartesian product)

                  Voila !

                  Yes that worked ! Thank you very much for giving this solution which actually goes against my feeling of defining a ONE to MANY relationship...

                  But heck it works. I do now get all the fields duplicated when there are more than one child. Just have to see what it does if there are no childs, but there is a parent..Probably no entry in this case.

                  Thanks again Gary. I owe you one. regards, Ron

                  Comment

                  Working...
                  X