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 report - problem with global variables

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

    web report - problem with global variables

    Trying to run a V10 working desktop report as a web report. Button on a grid executes the report. Report prints but... fields in the report that are global variables don't print, instead their field names print. I assume I must somehow make the global variables available for the report... thought it was transparent.
    Any help would be appreciated.

    #2
    Re: web report - problem with global variables

    Good day.

    We have the same problem. In the desktop we have some global variables (one called deptname) that is defined in defaults.dbf but is used in many different reports so is defined in startup as a global variable. Some of the globals are printed on every report in the desktop but in the WEB the report shows the actual global name & not the variable value.

    Did you get a solution & if so please advise? I am stuck. THANKS!!!!!

    dewayne

    Originally posted by Bob Beilfus View Post
    Trying to run a V10 working desktop report as a web report. Button on a grid executes the report. Report prints but... fields in the report that are global variables don't print, instead their field names print. I assume I must somehow make the global variables available for the report... thought it was transparent.
    Any help would be appreciated.

    Comment


      #3
      Re: web report - problem with global variables

      Where are you dimensioning and setting values for the global variables? This must be done on the web server and within your web server programming -- it cannot be assumed from something designed into a desktop system.
      -Steve
      sigpic

      Comment


        #4
        Re: web report - problem with global variables

        Thanks for the quick reply. Can you give an example and "where" in the "web programming" you would put this.

        dewayne

        Originally posted by Steve Workings View Post
        Where are you dimensioning and setting values for the global variables? This must be done on the web server and within your web server programming -- it cannot be assumed from something designed into a desktop system.

        Comment


          #5
          Re: web report - problem with global variables

          Dwayne, I haven't solved the problem yet. Hopefully Steve will answer your request and show how global variables are setup on the web server. I haven't been able to find an example of how it's done in the documentation. I set up all my desktop global variables with the "Set variable(s) to field value - external table" script genie. I enter the variables into the tables and run the script "autoexecute" so that whenever I bring the alpha application up the global variables are set.

          Comment


            #6
            Re: web report - problem with global variables

            You can dimension a global variable anywhere you can insert Xbasic.

            Simply:

            Code:
            dim global MyVar as C = "SomeValue"
            The details for your particular needs depend on what you're doing, and where.
            -Steve
            sigpic

            Comment


              #7
              Re: web report - problem with global variables

              In the desktop applicaton some global variables (from default.dbf) are defined & are put in a startup script. These are used on the printed WORK ORDER & PURCHASE ORDER. Example fields: default->departmentname & default->woname & others.

              The problem arises when we "attempt" to print a Work Order from the WEB version. Instead of the global variable we get the actual field name (departmentname) instead of "Maintenance Department" on the Work Order.

              I put the following code on PrintWO.A5W page that prints a Work Order:

              <%a5
              '---------------------------------------------
              'Assigning of the global variables
              '---------------------------------------------
              dim global DEPARTMENTNAME as c
              dim global PONAME as c
              dim global WONAME as c

              '----------------------------------------------
              'Open Table DEFAULT and assign field values to variables
              '------------------------------------------------
              dim TBL as p
              tbl = table.open("Default")
              DEPARTMENTNAME = tbl.DEPARTMENTNAME
              PONAME = tbl.PONAME
              WONAME = tbl.WONAME
              tbl.close()
              %>

              I get an error message on line26 which is "tbl = table.open("Default")". The error says "error loading default, the system can not find the file specified, DEFAULT.DBF"

              Originally posted by Steve Workings View Post
              You can dimension a global variable anywhere you can insert Xbasic.

              Simply:

              Code:
              dim global MyVar as C = "SomeValue"
              The details for your particular needs depend on what you're doing, and where.
              Thanks for everything.

              dewayne "the non programmer"

              Comment


                #8
                Re: web report - problem with global variables

                The problem may be that the server can't find your table. You need to specify the path, which should be set up in your web publishing profile.

                Instead of this:

                Code:
                tbl = table.open("Default")
                Try this:

                Code:
                tbl = table.open("[pathalias.adb_path]\Default")
                If this still fails, check the Alias section in your profile to make sure the path that's specified is the same path as the server sees to get to your table.
                -Steve
                sigpic

                Comment


                  #9
                  Re: web report - problem with global variables

                  THANKS Steve that did the trick. We really appreciate the time you take to reply.

                  dewayne

                  Comment


                    #10
                    Re: web report - problem with global variables

                    Dewayne & Steve,

                    I put code into my a5w page as you did to assign global variables from a table.

                    I viewed the page source, ran debug and I can see it is loading from the table the field information into the variables(over a 100 variables).

                    So far so good. My grid on the page has a button that brings up a form using action scripting. But still my report shows only the field titles, not the field data.

                    Dewayne I think you will still have your problem after you fix you ""error loading default" problem.

                    (revised 5:54)Dewayne I see you got the table to load, sounds like you've got the report printing properly.


                    Bob
                    Last edited by Bob Beilfus; 06-27-2010, 05:55 PM. Reason: the problem appears to be fixed

                    Comment


                      #11
                      Re: web report - problem with global variables

                      Yes, both the WO & PO prints properly now out on the internet. The report picks up the variables. Due to Steve's fine HELP!

                      dew

                      Comment


                        #12
                        Re: web report - problem with global variables

                        Bob - You're setting variables on a page, which contains a grid, then pops a "form." I'm not sure what you mean by "form" but I suspect that context is an issue here.

                        If you're printing the report from that form, then you might try establishing the variables on/in that form.

                        What code do you have/use to print the report? That's the very best place to put this sort of thing.
                        -Steve
                        sigpic

                        Comment


                          #13
                          Re: web report - problem with global variables

                          Steve, sorry, the grid has buttons that bring up various reports. I saved the grid as a page, then put the xbasic in the page source. Ran debug and variables are loaded from the table. But the reports still show field titles not field data.

                          I also put that code in the grid with events OnGridInitialize and still the reports show titles?

                          Comment

                          Working...
                          X