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

Refresh supercontrol (report preview)

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

    Refresh supercontrol (report preview)

    Sorry if this is explained somewhere (I can't find it) but what is the syntax for refreshing a report preview supercontrol from a script or from event code on a form?

    Thanks

    #2
    Re: Refresh supercontrol (report preview)

    Andrea, I am glad you brought this up. I tried placing the clock on a form to show the current time. However, when I went to Action Scripting for the Ontimer event, V9 did not recognize the Super control clock as an object in order to refresh the clock object. So I would like to know if the clock can be refreshed on a form?

    Comment


      #3
      Re: Refresh supercontrol (report preview)

      Did you try the ontimer event for the form. Not that i know if it will work, but a thought.
      Dave Mason
      [email protected]
      Skype is dave.mason46

      Comment


        #4
        Re: Refresh supercontrol (report preview)

        I went to the form events then
        1. Form Ontimer
        2. action scripting
        3. object properties
        4. Refresh objects - however if you try to ADD an object to the list of objects to be refreshed, the supercontrol is NOT listed and you cannot manually input an object.

        I do NOT want to refresh the entire form as it would update queries (if on) and I do not want that.

        Comment


          #5
          Re: Refresh supercontrol (report preview)

          Originally posted by Phil Rolf View Post
          I went to the form events then
          1. Form Ontimer
          2. action scripting
          3. object properties
          4. Refresh objects - however if you try to ADD an object to the list of objects to be refreshed, the supercontrol is NOT listed and you cannot manually input an object.

          I do NOT want to refresh the entire form as it would update queries (if on) and I do not want that.
          Same here, the supercontrol is listed in the Xbasic Explorer but I haven't a clue what to do with this. YES I do want to refresh the form but only if an email whose data was added to the tables on these two reports has been updated...

          Comment


            #6
            Re: Refresh supercontrol (report preview)

            Originally posted by Phil Rolf View Post
            Andrea, I am glad you brought this up. I tried placing the clock on a form to show the current time. However, when I went to Action Scripting for the Ontimer event, V9 did not recognize the Super control clock as an object in order to refresh the clock object. So I would like to know if the clock can be refreshed on a form?

            the clock supercontrol is designed to show the value of a field in the table that the form is based on. in other words, instead of showing the value of some time field in an edit box, it shows the value in a clock.

            the clock supercontrol is not a "free standing" clock that shows the current time.

            because the clock is "bound" to a field in the current table, it does not need to be refreshed. it always automatically shows the value in field to which it is bound.

            in effect, the clock is just another type of 'input control' for a time field on the form.

            if you wanted the clock to show the current time, you would have to do this:
            1. create a time variable on the form.
            2. place a supercontrol clock on the form, and bind it to this variable.
            3. in the form's onTimer event, set the value of this time variable.

            the clock will then automatically display the value in the time variable.

            Comment


              #7
              Re: Refresh supercontrol (report preview)

              Originally posted by NoeticCC View Post
              Sorry if this is explained somewhere (I can't find it) but what is the syntax for refreshing a report preview supercontrol from a script or from event code on a form?

              Thanks
              Not sure what you mean by 'refresh' a report preview control.

              The report preview is automatically refreshed when you navigate to a new record, or whenever a field or variable in the report preview control's "linking expression" changes.

              you never have to "manually" refresh the control. it is all automatic.

              if you can point us to some instance where the report preview should have refreshed, but did not, point it out to us, and we will fix it.

              Comment


                #8
                Re: Refresh supercontrol (report preview)

                Originally posted by Selwyn Rabins View Post

                in effect, the clock is just another type of 'input control' for a time field on the form.

                if you wanted the clock to show the current time, you would have to do this:
                1. create a time variable on the form.
                2. place a supercontrol clock on the form, and bind it to this variable.
                3. in the form's onTimer event, set the value of this time variable.

                the clock will then automatically display the value in the time variable.
                Selwyn,

                The focus also has to remain on the field for the clock to update in realtime (or so it seems). Is this correct?

                Bill
                Bill Griffin
                Parkell, Inc

                Comment


                  #9
                  Re: Refresh supercontrol (report preview)

                  Originally posted by Bill Griffin View Post
                  Selwyn,

                  The focus also has to remain on the field for the clock to update in realtime (or so it seems). Is this correct?

                  Bill
                  no, i don't think that would or should be necessary.

                  alpha five automatically puts a "watch" on any variable that a clock supercontrol is bound to and then when that variable's value changes, the clock will automatically update.

                  Comment


                    #10
                    Re: Refresh supercontrol (report preview)

                    Selwyn,

                    I just tried this and it does seem that the field need to have focus for the clock to refresh.

                    Bill
                    Bill Griffin
                    Parkell, Inc

                    Comment


                      #11
                      Re: Refresh supercontrol (report preview)

                      Originally posted by Selwyn Rabins View Post
                      Not sure what you mean by 'refresh' a report preview control.

                      The report preview is automatically refreshed when you navigate to a new record, or whenever a field or variable in the report preview control's "linking expression" changes.
                      Ah that's it, basically I am using a form to display entries from two tables that get populated every few minutes with data from processing incoming emails to a specific Email address. Because the report doesn't need any retrieval arguments, it worked without my specifying the linking fields, but once I specified those it started refreshing whenever a new Email is processed. Thanks!

                      I guess I am just using this in lieu of a browse, as a read only display only "status report" of a list of recently handled Emails... The problem with using a browse is I want a snapshot and I do not want it to update constantly but rather only after new incoming emails have been handled. Plus, the scroll behaviour on the browse makes this a bit awkward too if I use browses instead. (And this is handy because the toolbar for the report preview allows you to save/email the current report straight away)

                      Comment


                        #12
                        Re: Refresh supercontrol (report preview)

                        Originally posted by Bill Griffin View Post
                        Selwyn,

                        I just tried this and it does seem that the field need to have focus for the clock to refresh.

                        Bill

                        I just tested it and it does work. You do need to call the clock object .refresh() method.

                        Here is how I did it.

                        1. I defined a session variable call 'time1. (it could have been a form variable or a global - does not matter what scope you choose)
                        to define the variable, I clicked the "V" button on the toolbar and typed
                        time1 = now()

                        2. I put a clock supercontrol on the form and bound it to 'var->time1' . I noted that the clock object name was "clock1"

                        3. in the form's OnTimer event i put:

                        dim shared time1 as t
                        time1 = now()
                        clock1.refresh()


                        This works fine.
                        Last edited by Selwyn Rabins; 03-27-2008, 12:41 PM.

                        Comment


                          #13
                          Re: Refresh supercontrol (report preview)

                          Why dont you put a dock panel associated with the forms, then the user can turn it off if required here is mine. Which was formed using the following code:
                          Code:
                          function dockPanel_5 as v (vars as p )
                          with vars 
                          'Notice that the code in this function is wrapped in a 'with vars...end with' statement.
                          'Local_variables() are passed in when the function is called. 
                          'Because of the 'with vars' statement, this code is executing in the same variable frame as the Xdialog so it can
                          'see all of the variables in the Xdialog.
                          DIM SHARED cl as T
                          DIM cl_Clock as P
                          cl=time("",now())
                          DIM cl_Clock.events as C = <<%str%
                          function onTimeSelect as v (ptr as p)
                           
                           ' Generated code. Do not delete!
                           ' ------------------------------------------------------------------------
                           if eval_valid("ptr.variableName") then
                            dim sv as p
                            sv = session_variables()
                            evaluate_template("sv."+ptr.variableName+" = if(typeof(sv."+ptr.variableName+")=\"T\",ptr.time,ptr.shortTime)")
                           end if
                           ' ------------------------------------------------------------------------
                          end function
                          function onMeridianChange as v (ptr as p)
                           
                          end function
                          %str%
                          if typeof(cl) = "Y" then
                           DIM cl_Clock.shortTime as Y = cl
                          else
                           DIM cl_Clock.time as T = cl
                          end if
                          DIM cl_Clock.variableName as C = "cl"
                          dim dlg_panel_body as c 
                          dlg_panel_body = <<%dlg%
                          {background=Pale Blue}
                          {timer=increment}
                          {interval=1}
                          {stretch=height,width}
                          {TimePicker=40,15cl_Clock}{watch=cl!update_cl_Clock};
                          {stretch=}
                          {stickto=bottom,left}
                          %dlg%
                          dim dlg_panel_event as c 
                          dlg_panel_event = <<%code%
                          if a_dlg_button = "increment" then
                              cl_Clock.shortTime=time("",now())
                          
                              
                          end if

                          Comment


                            #14
                            Re: Refresh supercontrol (report preview)

                            Originally posted by Selwyn Rabins View Post
                            I just tested it and it does work. You do need to call the clock object .refresh() method.

                            Here is how I did it.

                            1. I defined a session variable call 'time1. (it could have been a form variable or a global - does not matter what scope you choose)
                            to define the variable, I clicked the "V" button on the toolbar and typed
                            time1 = now()

                            2. I put a clock supercontrol on the form and bound it to 'var->time1' . I noted that the clock object name was "clock1"

                            3. in the form's OnTimer event i put:

                            dim shared time1 as t
                            time1 = now()
                            clock1.refresh()


                            This works fine.
                            Ah Ha!! missing the clock1.refresh()

                            Thanks
                            Bill Griffin
                            Parkell, Inc

                            Comment


                              #15
                              Re: Refresh supercontrol (report preview)

                              Originally posted by Bill Griffin View Post
                              Ah Ha!! missing the clock1.refresh()

                              Thanks
                              Yep, that's sort of what I was looking for too, just the basic syntax... Normally I just try it out, don't know why I didn't bother this time!

                              Comment

                              Working...
                              X