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



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

Xdialog problem

  • Filter
  • Time
  • Show
Clear All
new posts

  • Xdialog problem

    I am trying to create a desktop application to keep track of inventory of textbooks for our school system. At this point I am trying to create a dialog box to input a room number which will use a report to show what textbooks are in a certain room. I have created the dialog box with a field that is 6 characters long. The dialog box comes up and I input the room number then the report comes up but not with the filtered data. All the data shows up. I tried to follow the training to a tee. I have repeated the building steps many times but..... Any ideas? Thanks. Also, do any of you have a sample of a straight inventory program that I could look at to help with the textbook inventory program? Merry Christmas.

  • #2
    Re: Xdialog problem

    Are you using the reports "Select Records" (in design mode for the report, select "report" from the upper menu then "select Records"?

    What is the filter that you are using? Something like

    room_number = var->nameofvariable for room number
    Or have you created a query opertion to get the records you need?

    Tom Baker


    • #3
      Re: Xdialog problem

      I am using Records selected by a filter expression. The filter expression is:
      Room_ number=Var->room_number. thanks.


      • #4
        Re: Xdialog problem


        Could you post a small sample to look at



        • #5
          Re: Xdialog problem

          Here is a sample of what I think you need



          • #6
            Re: Xdialog problem

            Here is the folder with the start of the application. Any suggestions is appreciated.
            Attached Files


            • #7
              Re: Xdialog problem


              There was nothing in the zip file except folders



              • #8
                Re: Xdialog problem

                Let me try it again.


                • #9
                  Re: Xdialog problem


                  I see a lot of forms - can you tell me which one I should be looking at for the dialog and then the report?



                  • #10
                    Re: Xdialog problem


                    I do appreciate you patience. I created the code--it is room inventory--it should be the only code. The report is room inventory.


                    • #11
                      Re: Xdialog problem


                      It seems that this app was converted from Version4. There also seems to be one corrupted form (room number).

                      Anyway, I have attached your zip file revised. Put the filter for the report in the report itself (in design mode, select report, then select "select Records" and in the box at the top I put the filter (room_number=var->room_number).

                      Then in action scripting for "print the layout" in your code, I changed the select records to print from "records selected by a filter expression" to "no additional selection criteria".

                      Now when you run the report, you put in a room number in the dialog box and then the report runs showing just the room number you want.

                      There seems to be some trouble using the filter from the code - I don't know why right now, but I will keep on checking a get back to you. But by putting the filter directly into the select records of the report - it will work just fine.

                      Tom Baker

                      Edit -

                      I wasn't seeing the forest for the trees.

                      If you put a button a form which is based on the testbook_orders.dbf which calls the script (code), it will run the report the way you want it from you original code.

                      I was trying to run the code from the code editor which was not relating properly to the correct table when running the report.

                      Again just place a button on a form associated with textbook_order table and run the room inventory script from that button.
                      Last edited by Tbaker; 12-21-2008, 02:14 PM. Reason: Found the reason


                      • #12
                        Re: Xdialog problem


                        Just to keep this thread in order, I have attached a zip file based upon the edit from my last post.

                        I put a button on the "TextbookS" form called "Run the room inventory Report" which just has the code

                         script_play("room inventory")

                        You could also just copy your code to that button and it will do the same thing.

                        I changed the code back to your original code and deleted the filter from "select records" in the reports properties.



                        • #13
                          Re: Xdialog problem

                          Originally posted by Tbaker View Post
                          You could also just copy your code to that button and it will do the same thing.
                          Absolutely true BUT it's often easier to develop when the code is in the Code tab and use Script_play("<ScriptName>") to call it from the button/event.

                          Consider these two editing scenarios. You've just finished testing your first attempt at fixing a problem and find you need to change something else. (I know, a truly good developer would get it on the first attempt but not me.):

                          1. Code on the button:
                          - Switch the form to Design mode. (a short wait)
                          - Right click the button to be edited.
                          - Select Events / On Push.
                          - Another short wait for the script to open then edit the script.
                          - Save and close the script.
                          - Save the form and switch back to View mode (another short wait) to test your changes.

                          2. Script in the Code tab.
                          - Click the Code tab in the Window Bar and edit the script.
                          - Click on the form name in the Window Bar and test your changes.

                          I don't know about other developers but I like #2 much better.

                          Even if you're just starting the first edit in option #2, you don't have to close the form. Just go to the Control Panel, select the Code tab, and open the script. After that you can just switch back and forth.

                          That's not to say I don't have quite a few scripts directly in my buttons/events but those are only the very simple ones that shouldn't need to be edited unless I decide to make a change to the functionality. (i.e., a simple script like parentform.commit() probably won't need to be edited unless I decide to add some other feature.) If the script is complex or longer than what fits on about 1 screen, I usually put it in the Code tab for ease of development.


                          • #14
                            Re: Xdialog problem


                            Good advice

                            Tom Baker


                            • #15
                              Re: Xdialog problem

                              I am glad that you have written up what I have tried to explain to several folks about the efficiency of scripts off buttons. I have gone one step further in making them user defined functions (UDFs), which is even easier to type.

                              Let me also add this. Form Curruption. There have been occassions where a form gets corrupted and whatever is on the form is LOST! Hours work on a form with lots of coding on buttons...not yet backed up...lost. That only needs to happen once to adopt this approach.
                              Mike W
                              "I rebel in at least small things to express to the world that I have not completely surrendered"