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

Strategy on creating report

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

    Strategy on creating report

    Hopefully someone can point me to the right "path" here. I have a desktop application which tracks video views on a weekly basis. The structure is a master table (video_id, title) and a child (video_id, title, views, period). one to many relationship. I want to generate a report which gives the view difference per period. if this matters we want to track about 20 videos now but this may be 40 or 50 soon. so the report should be:

    Terminator

    12/14/2009 600
    12/20/2009 800 200
    12/26/2009 700 (100)

    It's a wonderful Life
    12/14/2009 300
    12/20/2009 500 200
    12/26/2009 700 200

    Thank you very much in advance.. rg

    #2
    Re: Strategy on creating report

    Hi Randall,

    The report will work just as you have laid it out, what data do you have?
    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: Strategy on creating report

      thank you Keith, I'm not sure how to accomplish the change in previous period. Any help here would be appreciated.
      Randall

      Comment


        #4
        Re: Strategy on creating report

        Originally posted by greener View Post
        ... master table (video_id, title)
        child (video_id, title, views, period).
        For the child: video_id, views, period

        You don't need to repeat the "title" field in the child. That sort of defeats the purpose of a relational db.

        I'm not sure how to accomplish the change in previous period
        ??
        Peter
        AlphaBase Solutions, LLC

        [email protected]
        https://www.alphabasesolutions.com


        Comment


          #5
          Re: Strategy on creating report

          Hi Peter,

          change in previous period
          It looks like the difference as a calculated value from this period against the value in the previous period.
          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: Strategy on creating report

            Originally posted by Peter.Greulich View Post
            For the child: video_id, views, period

            You don't need to repeat the "title" field in the child. That sort of defeats the purpose of a relational db.

            ??
            yes Peter my mistake here. it should have been master table (video_id, title) and child (video_id, views, period). one to many relationship.

            Comment


              #7
              Re: Strategy on creating report

              Sorry Randall but I am lost here:

              Parent: video_id, title
              Child: video_id, views, period

              I see here that you want to see in your report 3 things: video title (parent) and views (child) and period (child). First what is the period (single time point, range, calculation???) and what is a view? Either way, two of the records below have 4 values not 3.
              It's a wonderful Life
              12/14/2009 300
              12/20/2009 500 200
              12/26/2009 700 200
              I believe you are going to have to be a bit more precise and detailed to help us help you.
              Mike W
              __________________________
              "I rebel in at least small things to express to the world that I have not completely surrendered"

              Comment


                #8
                Re: Strategy on creating report

                Hi Mike,
                sorry for the confusion. Let me clarify the example.
                It's a wonderful Life
                Week of Views Difference
                12/14/2009 300
                12/20/2009 500 200
                12/26/2009 700 200

                So the period and views are a single point in time. During the week of 12/20/2009 we had 500 views, which is a 200 increase compared to the previous week. I am challenged in figuring how to calculate the 200 difference.

                in the above example the week of 12/14/2009 does not have a difference as it is the first week with no prior period to compare.

                Thank you very much!

                Randall

                Comment


                  #9
                  Re: Strategy on creating report

                  Originally posted by greener View Post
                  I am challenged in figuring how to calculate the 200 difference.
                  Ok. The easiest way is to use the previous() function to retrieve the last value. Create a calc expression on your form called "difference". Something like:

                  Views - previous("views")
                  Peter
                  AlphaBase Solutions, LLC

                  [email protected]
                  https://www.alphabasesolutions.com


                  Comment


                    #10
                    Re: Strategy on creating report

                    It may be due to my inexperience here but my calculated field "difference" in the report is showing the views (in my application the field is named "Watch_Views") for the first three records and not the difference between Watch_Views in current period and previous period) and then the difference values change to 0 for the rest of the report. My calculated field is
                    Yt_Weekly_Report->Watch_Views - previous("Yt_Weekly_Report->Watch_Views")

                    In looking at the documentation for Previous() it says "Note : If you are working with a set, PREVIOUS() returns field values only from the previous record in the primary table"

                    and in my application my calculated field for views is a child (Yt_Weekly_Report->Watch_Views).

                    Thank you.

                    Randall

                    Comment


                      #11
                      Re: Strategy on creating report

                      Originally posted by greener View Post
                      and in my application my calculated field for views is a child
                      The way I would do it is create a diff field and use xbasic to calc the values. But I'm sure others may have more clever methods.
                      Peter
                      AlphaBase Solutions, LLC

                      [email protected]
                      https://www.alphabasesolutions.com


                      Comment


                        #12
                        Re: Strategy on creating report

                        I'm sure there must be a simpler calculated field expression than what I came up with but it works in the attached example. It was tricky figuring how to derive the first date difference value when there is no previous.

                        Later,
                        Can someone explain why this report in the example will not order to the report order expression? Bug?
                        Mike W
                        __________________________
                        "I rebel in at least small things to express to the world that I have not completely surrendered"

                        Comment


                          #13
                          Re: Strategy on creating report

                          Randall, you've done a good job of showing us what your report should look like. Give us a sample of the data that you have to work with. You mention a set. Include data from all tables in the set and explain how the data would be translated, aggregated, or processed for the desired report.

                          Comment


                            #14
                            Re: Strategy on creating report

                            Mike,

                            What a great calculated expression.

                            The nearest I might have got to that would have been some type of operations, and built the report on a Temp table.

                            To blank the first difference value, it can be set to show blank if value = Zero.

                            The Order expression I used was V_Id+Yt_Weekly_Report->Week_Of_Views.

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


                              #15
                              Re: Strategy on creating report

                              thanks for everyone's help. Mike nailed it in terms of the structure and the result!

                              In the future I will take Tom's suggestion and include a sample data set.

                              To give a bit more info on the bigger picture, we are part of the youtube partnership program so we receive csv view reports from youtube on a weekly basis for each of our videos and films on Youtube. So this application will help track our views per video (in addition to all the meta data)... The video ID is actually the Youtube video id so future editions of the app will be online and enable us to click on a record in a grid and by using the youtube API have the youtube video appear in a window.

                              thanks again! Randall

                              Comment

                              Working...
                              X