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

User build reports in Runtime ?

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

    User build reports in Runtime ?

    Hi, Has anyone built the controls to allow a user with Runtime to create their own Reports and letters?

    I can see I will need to use the function a5_new_report_dialog().

    All help appreciated.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

    #2
    Re: User build reports in Runtime ?

    Yes, I have and Bill Parker has too, I believe. Most of what you need is in the documentation file that comes with the Runtime Plus, though it seems I recall there being a error or two in that documentation. But are you asking about just the regular runtime? I believe you need the Runtime Plus for any of this to work. And be warned that totally protecting your "system" reports, forms and letters from users is very difficult. Using what Alpha suggests, I never could block them from using Save As to overwrite things I did not want them messing with. Bill Parker suggested a way to give them their own "sandbox" to play in (a forum search should find this) by dropping their sets out of the main database. I ended up using Bill's approach but I must say it too has a few problems of its own (including taking a lot of time to set up) and since I just recently implemented it with a client, I am not yet sure how well it is working in practice.

    Raymond Lyons

    Try this thread: http://msgboard.alphasoftware.com/al...t=runtime+Plus
    Last edited by Raymond Lyons; 06-13-2009, 08:25 PM.

    Comment


      #3
      Re: User build reports in Runtime ?

      Hi Raymond,

      Thanks for getting back to me on this.

      I understand what you mean about the SQL .F. not working, I think the fix has been lost it the pile of things to fix before V10 comes out.

      In the Toolbar I have used the following code to SaveAs but the list of existing reports does not populate the dialog.
      I have elected to use this method to dynamically produce the Exclude List.
      Code:
      dim tbl_lst as c
      tbl_lst=a5.report_enum()
      tbl_lst=*for_each(x,x+"|report",tbl_lst)
      a5_layout_saveas("save report as ","Report",tbl_lst,"Please choose another name")
      Using the standard SaveAs the dialog gets populated, so what do you think is going wrong here?

      The other question is, how do you create a list of reports dynamically, that the user can edit that were only user created?
      Last edited by Keith Hubert; 06-14-2009, 06:11 AM.
      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


        #4
        Re: User build reports in Runtime ?

        Keith,
        The saveas dialog that comes up will bring up any report NOT on the exclude list. A bit of experimenting shows that perhaps you should have a static list of excluded reports as when not in the exclude list and you try to save another report by the same name, Alpha presents a dialog box asking whether to overwrite the existing or not.

        Also, What is listed in the saveas box are just the reports associated with whatever table/set was chosen to base the report on....so you can still have multiple reports with identical names when the reports are based upon different tables/sets.
        Mike
        __________________________________________
        It is only when we forget all our learning that we begin to know.
        It's not what you look at that matters, it's what you see.
        Henry David Thoreau
        __________________________________________



        Comment


          #5
          Re: User build reports in Runtime ?

          Originally posted by Keith Hubert View Post
          ...
          I understand what you mean about the SQL .F. not working, I think the fix has been lost it the pile of things to fix before V10 comes out.
          Actually, Selwyn has fixed this in V9, he just has not released a patch for it. You might be able to ask for a V9 pre-release patch with the fix. The new parameter structure for a5_new_report_dialog() is a5_new_report_dialog as p (type = "", prompt = "", title = "", table_set_list = "", alias_names = "", exclude_tables = .f., flagShowSQLDataSource = .t.)

          Originally posted by Keith Hubert View Post
          In the Toolbar I have used the following code to SaveAs but the list of existing reports does not populate the dialog.
          I have elected to use this method to dynamically produce the Exclude List.
          Code:
          dim tbl_lst as c
          tbl_lst=a5.report_enum()
          tbl_lst=*for_each(x,x+"|report",tbl_lst)
          a5_layout_saveas("save report as ","Report",tbl_lst,"Please choose another name")
          Using the standard SaveAs the dialog gets populated, so what do you think is going wrong here?
          I am not going to be of much help with Save As issues. As I said, I gave up on it. Why? I don't remember the details but I think there were two issues: 1) the code I did for Save As worked using the full version but did not work using the runtime, and 2) (and yes this was a separate issue) for the runtime the location of the files for the special toolbars and menus was not the A5 program folder but after some patch or another it ended being in the somewhere in the logged on user's Documents and Setting area. This for me was just too much to deal with in a multi-user networked environment in which more than one user occasionally uses any given machine (different network logons) and which employees come and go all the time. This is one of the main reasons I went with the Mike Reed/Bill Parker separate "sandbox" solution.


          Originally posted by Keith Hubert View Post
          The other question is, how do you create a list of reports dynamically, that the user can edit that were only user created?
          For this, I started out NOT using the separate sandbox solution but instead decided to, as much as possible, force users to begin their report names with a "Z" so I could identfy them. This did not do anything to deal with the Save As and other issues, so following a suggestion from Bill Parker I switched to the separate sandbox way of doing all this. For me, this means all user designed reports are based on one of two sets that are dropped from the database (this keeps them separate from my "system" reports). These two sets have the same tables and relationships as counterparts in the database but do not have any of the system reports and so on. Becasue these sets are dropped from the database, you have to use "qualified names" when addressing them, i.e., not just "Myreport" but "[email protected]".

          Anyway, what I did was take the Mike Reed/Bill Parker function posted (I think) in the Code Archive and modify it for my purposes. For one thing, I chose not to use the undocumented function they use, and I also added a bit of stuff to it, for example, I wanted users to be able to start their layouts with several pre-built templates which had to be duplicated and renamed before the users did whatever to them. For whatever it might be worth, this function is attached below. But I also created 2 other functions, one for users to filter, order and print just their reports (system reports are printed from different menus and buttons) and one to allow user to delete their layouts--but not system layouts.

          All in all, this was a lot of work, much of which there was no way I could bill any client for. If I had it to do again, I probably would not do it!

          Raymond Lyons

          Comment


            #6
            Re: User build reports in Runtime ?

            Update on my sandbox function: My users have not reported issues but I just did a bit more testing and for unknown reasons it seems to be flaky on one set when trying to edit any existing report layout if there is only one. I get a message "Error Read past end of file while trying to start application." and then "Command: A5_layout_Design(layoutname_long,layoutlbl) Object is not defined." Trouble is this only happens with one set and then only with reports (as opposed to letters). So back to the drawing board!

            Raymond Lyons

            Comment


              #7
              Re: User build reports in Runtime ?

              Originally posted by Raymond Lyons View Post
              Update on my sandbox function: My users have not reported issues but I just did a bit more testing and for unknown reasons it seems to be flaky on one set when trying to edit any existing report layout if there is only one. I get a message "Error Read past end of file while trying to start application." and then "Command: A5_layout_Design(layoutname_long,layoutlbl) Object is not defined." Trouble is this only happens with one set and then only with reports (as opposed to letters). So back to the drawing board!

              Raymond Lyons
              Another update: In case anyone is messing with the function I posted above, the error I was getting has been solved by adding Alltrim() in:
              Code:
              a5_layout_design(Alltrim(Layoutname_long),layoutlbl)
              I am not sure why it needed this for one of my 2 sets and not the other and why for reports but not letters.

              Raymond Lyons

              Comment


                #8
                Re: User build reports in Runtime ?

                Sample posted in Code Archive. Comments welcome.
                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


                  #9
                  Re: User build reports in Runtime ?

                  The attached sample app builds on something I began a while back to allow Runtime Plus users to create, edit and print their own reports without interfering with anything I build as a developer. The simple way Alpha suggests for this was problematic at the time (not sure what the situation is now). As I have stated elsewhere, to the extent I remember it, there were two main issues: 1) the code I did for Save As worked using the full version but did not work using the runtime, and 2) (and yes this was a separate issue) for the runtime the location of the files for the special toolbars and menus was not the A5 program folder but after some V9 patch or another it ended being in the somewhere in the logged on user's Documents and Setting area. This for me was just too much to deal with in a multi-user networked environment in which more than one user occasionally uses any given machine (different network logons) and which employees come and go all the time.

                  Midway through building my own function for creation/editing (forcing users to begin the layout names with a "Z") I happened on a post from Bill Parker that refereed to a function in the Code Archive that he and Mike Reed developed. This approach got around the Save As problem I was having by giving user their own "sandbox" to play in, that is, reports are in sets that are not part of the database. So, down that road I went. However, what I wanted was a bit complex. I wanted to give the users some pre-built templates they could start with, and I needed everything to work in a multiuser, networked Shadow database environment. Of course users in a shadow DB can't create/edit anything that will last, so I also had to develop a way for them to easily go to the Master DB and then back to the Shadow.

                  For printing I also wanted users to be able to build their own filter and order expressions and to be able to use a filter created by Query By Form on a form. Additionally, I wanted to be able to identify those layouts that had hard coded filters and give users a chance to add to them (which may not always work so well!).

                  Unfortunately, for some aspects of all this to work in V9 one needs bug fixes that have been made but so far have not been released in an official patch (I am now using a pre-release �beta� patch). I hope there will be one more official V9 patch before V10 is released. Still, most it should still work, just perhaps not perfectly. Just remember that some A5 bugs you find may have already been fixed (I do not now remember all the details of these fixed bugs). If you run into too many such problems, try again with V10, as it should have all the fixes I am referring to.

                  Anyway, attached is the sample app. It certainly still has some bugs that are mine not Alpha�s, and I am sure it could stand a lot of improvement (error handling and more efficient code in some places). If you improve the functions or the overall design in any way, I would appreciate it if you would share those improvements with me and others.

                  Raymond Lyons

                  Comment

                  Working...
                  X