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

Error with grid on a web page, Invalid order expression: Item+Description

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

    Error with grid on a web page, Invalid order expression: Item+Description

    I have spent all afternoon trying to resolve this error.

    I can publish to the local host and everything works fine.
    But when I publish to my test server, I end up with the following error on the web page:

    Invalid order expression: Item+Description

    Is it possible that the field name of description is too long?

    This is my second attempt at creating a web app and right now I'm totally frustrated. The app is based on this one table.
    I have one grid on one of two a5w pages and everything was going just fine until I started the process of publishing the app on my test server.

    I can log in, open the web page, but the grid does not open.

    I've got a headache. Time for a beer.

    Thanks,

    Ron
    Alpha 5 Version 11
    AA Build 2999, Build 4269, Current Build
    DBF's and MySql
    Desktop, Web on the Desktop and WEB

    Ron Anusiewicz

    #2
    Re: Error with grid on a web page, Invalid order expression: Item+Description

    Can you put a picture of what the query looks like?

    Comment


      #3
      Re: Error with grid on a web page, Invalid order expression: Item+Description

      I used Alpha's tool to create the filter and order expressions, primarily out of laziness.

      I copied the files to the server using a thumb drive.
      I had problems with the alias.

      I rebooted my computer and the server.

      I deleted the order and then I got and error message about the filter.
      I deleted the filter and still got an error about the filter.

      I removed the grid from the a5w form. Looked at all the settings of the grid, saved it and then used the insert component, the grid, back into the a5w form.

      I was following Steve Workings web training video almost every step of the way. I watched Selwyn's video on alias's.
      Sorry, I still have a headache.

      Thanks for your reply.

      Ron
      Attached Files
      Alpha 5 Version 11
      AA Build 2999, Build 4269, Current Build
      DBF's and MySql
      Desktop, Web on the Desktop and WEB

      Ron Anusiewicz

      Comment


        #4
        Re: Error with grid on a web page, Invalid order expression: Item+Description

        Ron,

        I had a quick look at the order on one of my grids and it is listed as field1, field2 not field1+field2

        Stephen
        Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

        Comment


          #5
          Re: Error with grid on a web page, Invalid order expression: Item+Description

          Hi Steve,

          I tried your suggestion. While the grid would open, the items where not in the proper sort order. I used alpha sort genie to create the order expression. It seems that it should work.

          I opened the grid and looked at the xbasic. While I really didn't know what to look for, all references to sort order and the fields in question appear to be correct.

          Thanks,

          Ron
          Alpha 5 Version 11
          AA Build 2999, Build 4269, Current Build
          DBF's and MySql
          Desktop, Web on the Desktop and WEB

          Ron Anusiewicz

          Comment


            #6
            Re: Error with grid on a web page, Invalid order expression: Item+Description

            I just tried removing the field description from both the fileter and the order of the grid. Now I'm getting this error:

            Error expanding Grid Part template: Variable "description" not found.

            I have no idea what this means nor the first place to look.

            Anyone have any ideas?

            Ron
            Alpha 5 Version 11
            AA Build 2999, Build 4269, Current Build
            DBF's and MySql
            Desktop, Web on the Desktop and WEB

            Ron Anusiewicz

            Comment


              #7
              Re: Error with grid on a web page, Invalid order expression: Item+Description

              I still haven�t been able to resolve this problem.

              I have a network desktop application which works just fine. All I want to do is to enable people to view one table of the database via the web.

              I moved the entire database application to the server. The database is in it�s own folder separate from the a5webroot. The folders were created from publishing the web application using Alpha 5.

              When I publish the application to the local web root, everthing work fine. When I try to view the application over the web, the form with the one grid will not open the grid.

              I recreated the form and the grid from scratch with the same results. The grid is a read only grid.

              I find this very frustrating as I�m at a real loss as to what is going on. Why does the a5w page work OK on the localhost but not on the web???? If the a5w page would not work on the localhost, I could fix it.

              This is not some hugely complex web application. I�m trying to open one page with a simple grid that has just 6 columns. I�m only dealing with less than 25 records. I have searched this board and I can�t seem to find a similar problem.

              I have installed the last build available for 10.5, server and developer.

              Any help would be greatly appreciated.

              Ron
              Attached Files
              Alpha 5 Version 11
              AA Build 2999, Build 4269, Current Build
              DBF's and MySql
              Desktop, Web on the Desktop and WEB

              Ron Anusiewicz

              Comment


                #8
                Re: Error with grid on a web page, Invalid order expression: Item+Description

                I've never had this kind of problem. However, I can tell you what I would try.

                1. Will it work if you publish it without an order?
                2. Use Firefox Firebug and see if you can see anything in the debug mode.
                3. If this is a DBF file can you re-index and rebuild the keys and make sure those files are on the server with the DBF files?
                4. Also, I open the Server wide open to make sure that it is not a permissions issue.

                Comment


                  #9
                  Re: Error with grid on a web page, Invalid order expression: Item+Description

                  I'm running server 2003.

                  I checked the error log and I found this message:

                  [Sat Dec 10 12:54:45 2011] [Forbidden] The security settings for this server are missing or incomplete.<p>

                  I brought up the task manager an the WAS is running as an administrator.
                  The dbf for the application, security setting for administrator is a greyed out, checked checkbox.

                  This looks like a possible source for the problem.

                  Ron
                  Alpha 5 Version 11
                  AA Build 2999, Build 4269, Current Build
                  DBF's and MySql
                  Desktop, Web on the Desktop and WEB

                  Ron Anusiewicz

                  Comment


                    #10
                    Re: Error with grid on a web page, Invalid order expression: Item+Description

                    In one of my previous posts on this thread I have a picture of my grid. For some reason, the only way I can get the grid to display on the WEB is to remove the field "Description" from the grid.

                    Does this make any sense to anyone???

                    Remove "Description", grid plays nice. Add "Description" and the grid fails.

                    Description, Character, 30

                    Works great on the desktop. There are no indexes build against this field.

                    The Grid is OK in Live Preview and Working Preview but does not work across the WEB.

                    Ron
                    Alpha 5 Version 11
                    AA Build 2999, Build 4269, Current Build
                    DBF's and MySql
                    Desktop, Web on the Desktop and WEB

                    Ron Anusiewicz

                    Comment


                      #11
                      Re: Error with grid on a web page, Invalid order expression: Item+Description

                      This is the xbasic code for the grid that I'm having trouble with.
                      The attached picture is of the grid. As long as the field "Description" is part of the grid, the grid crashes.
                      I get this error message:

                      Error expanding Grid Part template: Variable "description" not found.

                      Remove the field Description and all is well.

                      The table that makes up the grid is a fully functional table in a desktop application. All I'm trying to do is to view
                      some fields from that table over the WEB.


                      Code:
                      dim tmpl as p
                      tmpl.ComponentName = "Items_List"
                      tmpl.ComponentType = "Grid"
                      tmpl.AjaxOn = .t.
                      tmpl.LayoutColumns = 1
                      tmpl.SecurityModel = "Group Based"
                      tmpl.SecurityMode = ""
                      tmpl.PreCalcMode = "Standard"
                      tmpl.clientSideDateFormat = "MM/dd/yyyy"
                      tmpl.datePicker.dayNames = "Sun,Mon,Tue,Wed,Thu,Fri,Sat"
                      tmpl.datePicker.firstDayOfWeek = 1
                      tmpl.datePicker.monthNames = "January,February,March,April,May,June,July,August,September,October,November,December"
                      tmpl.datePicker.todayButtonText = "Today"
                      tmpl.datePicker.closeButtonText = "Close"
                      tmpl.publishedServerVariables = ""
                      tmpl.customizationString.javascriptDialogs = ""
                      tmpl.iconMapOverrides = ""
                      tmpl.DataSourceType = "DBF"
                      tmpl.DBF.type = "Table"
                      tmpl.DBF.table_name = ""+chr(92)+chr(92)+"maximus\maximus\apps\alpha5\skiswap\item.dbf"
                      tmpl.DBF.primaryKey = "recno()"
                      tmpl.DBF.filter = "isnotblank(\"item\").AND.Sold=.F."
                      tmpl.DBF.order = "item"
                      tmpl.DBF.flags = ""
                      
                      DIM tmpl.Arguments[0] AS P
                      DIM tmpl.ArgumentsPage AS P
                      with tmpl.ArgumentsPage
                      	.PromptTextAbove = ""
                      
                      end with
                      tmpl.DBF.fieldmap = <<%str%
                      key_table_1,n,5,0=recno("item")
                      TAG_NO,C,5,0=tag_no
                      ITEM,C,25,0=item
                      DESCRIPTION,C,30,0=description
                      SIZE,C,16,0=size
                      PRICE,N,16,2=price
                      %str%
                      
                      
                      DIM tmpl.update.tables[1] as P
                      tmpl.update.tables[1].name = ""+chr(92)+chr(92)+"maximus\maximus\apps\alpha5\skiswap\item.dbf"
                      tmpl.update.tables[1].PrimaryKey = "recno()"
                      tmpl.update.tables[1].PrimaryKeyType = "N"
                      tmpl.update.tables[1].table_alias = "item"
                      tmpl.honorDBFFieldRules = .t.
                      
                      tmpl.grid_layout_style = 1
                      tmpl.add_records_only = .f.
                      tmpl.rows = 10
                      tmpl.maxRowsPerPage = 200
                      tmpl.rowsWhenSearchActive = -1
                      tmpl.suppress_empty_rows = .t.
                      tmpl.has_row_separator = .t.
                      tmpl.alternate_bands = .f.
                      tmpl.even_band_size = 1
                      tmpl.odd_band_size = 1
                      tmpl.alternate_column_bands = .f.
                      tmpl.even_column_band_size = 1
                      tmpl.odd_column_band_size = 1
                      tmpl.conditionalStyle = ""
                      tmpl.clientSideConditionalStyle = ""
                      tmpl.show_title = .f.
                      tmpl.title = ""
                      tmpl.FontSize = "Medium"
                      tmpl.No_records_message = "No records in query"
                      tmpl.total_records_row_position = 1
                      tmpl.total_records_row = "Registered Items:&nbsp; {Total_Records}&nbsp;"
                      tmpl.show_column_titles = 1
                      tmpl.suppress_titles_if_no_records = .f.
                      tmpl.show_row_labels = .t.
                      tmpl.sort_style = 3
                      tmpl.reset_page_number_when_sorting = .t.
                      tmpl.EditRegion.Grid.Top = <<%editregion%
                      %editregion%
                      tmpl.EditRegion.Grid.Bottom = <<%editregion%
                      %editregion%
                      tmpl.EditRegion.Grid.Left = <<%editregion%
                      %editregion%
                      tmpl.EditRegion.Grid.Right = <<%editregion%
                      %editregion%
                      tmpl.HasNewRecordsTitle = .f.
                      tmpl.NewRecordsTitle = "<tr><td class=\"{a5_style}ColumnTD\" colspan=\"{a5_colspan}\" style=\"padding: 0px;\" >New Records</td></tr>"
                      tmpl.HasExistingRecordsTitle = .f.
                      tmpl.ExistingRecordsTitle = "<tr><td class=\"{a5_style}ColumnTD\" colspan=\"{a5_colspan}\" style=\"padding: 0px;\" >Existing Records</td></tr>"
                      tmpl.Highlight_row_onHover =  .f.
                      tmpl.Highlight_row_onSelect =  .t.
                      tmpl.HasRecordsPerPageSelector = .t.
                      tmpl.RecordsPerPageChoices =   "1,5,10,15"
                      tmpl.RecordsPerPageSelectorTemplate = "&nbsp;&nbsp;{Grid.RecordsPerPageSelector} Records per page"
                      tmpl.has_qbe_row = .f.
                      tmpl.qbe.initial_display = "Hidden"
                      tmpl.qbe.toggleQBERowHyperlinkText = "Show/Hide QBE Row"
                      tmpl.hasLinkedContent = .f.
                      tmpl.hasExternalNavigators = .f.
                      tmpl.hasRowExpandColumn = .f.
                      tmpl.hasSelectedRowColumn = .f.
                      tmpl.hasCheckboxSelectColumn = .f.
                      tmpl.AdditionalGridStyles = ""
                      tmpl.LocalCss = ""
                      tmpl.CSSLinkedFiles = ""
                      tmpl.JavaScriptLinkedFiles = ""
                      tmpl.useMasterTemplate = .f.
                      tmpl.MasterTemplateStyle = "Table - Vertical Layout"
                      tmpl.MasterLayoutTemplate = ""
                      tmpl.MasterLayoutTemplateJavascript = ""
                      tmpl.MasterLayout.PaneLabel.Search = "Search"
                      tmpl.MasterLayout.PaneLabel.Grid = "Grid"
                      tmpl.MasterLayout.PaneLabel.DetailView = "Detail"
                      tmpl.MasterLayout.AccordionStyle = "Multiple"
                      tmpl.MasterLayout.InitialOpenPanes = "Search,Grid,DetailView"
                      tmpl.CanCollapseGrid = .f.
                      tmpl.CollapseBar.Title = "Collapse Grid"
                      tmpl.CollapseBar.OpenIcon = ""
                      tmpl.CollapseBar.ClosedIcon = ""
                      tmpl.CollapseBar.Style = ""
                      tmpl.Collapsebar.Class = ""
                      tmpl.Collapsebar.ContainerStyle = ""
                      tmpl.Collapsebar.ContainerClass = ""
                      tmpl.Collapsebar.InitialState = "open"
                      
                      
                      tmpl.fields = 5
                      DIM tmpl.field_info[tmpl.fields] as P 
                      with tmpl.field_info[1]
                      	.Fieldname = "Tag_no"
                      	.Scope = "Local"
                      	.DisplayFormat = ""
                      	.DisplayUnFormat = ""
                      	.ConditionalStyle = ""
                      	.ConditionalStyleLevel = "Cell"
                      	.ClientSideConditionalStyle = ""
                      	.ClientSideConditionalStyleLevel = "Cell"
                      	.QBEDisable = .f.
                      	.QBEInlineStyle = ""
                      	.canBeUsedInWhereClause = .t.
                      	.Type = "C"
                      	.Varname = "TAG_NO"
                      	.Column.LabelPosition = "Left"
                      	.Controltype = "Label"
                      	.Label.InLineStyle = "text-align: center;"
                      	.BreakType = "None"
                      	.nCols = 1
                      	.Column.Hide = .f.
                      	.Column.Heading = "Tag No"
                      	.Column.Sort = "Tag_No"
                      	.Column.InLineStyle = "width: 80px;"
                      end with
                      with tmpl.field_info[2]
                      	.Fieldname = "Item"
                      	.Scope = "Local"
                      	.DisplayFormat = ""
                      	.DisplayUnFormat = ""
                      	.ConditionalStyle = ""
                      	.ConditionalStyleLevel = "Cell"
                      	.ClientSideConditionalStyle = ""
                      	.ClientSideConditionalStyleLevel = "Cell"
                      	.QBEDisable = .f.
                      	.QBEInlineStyle = ""
                      	.canBeUsedInWhereClause = .t.
                      	.Type = "C"
                      	.Varname = "ITEM"
                      	.Column.LabelPosition = "Left"
                      	.Controltype = "Label"
                      	.Label.InLineStyle = ""
                      	.BreakType = "None"
                      	.nCols = 1
                      	.Column.Hide = .f.
                      	.Column.Heading = "Item"
                      	.Column.Sort = "Item"
                      	.Column.InLineStyle = "width: 90px;"
                      end with
                      with tmpl.field_info[3]
                      	.Fieldname = "Description"
                      	.Scope = "Local"
                      	.DisplayFormat = ""
                      	.DisplayUnFormat = ""
                      	.ConditionalStyle = ""
                      	.ConditionalStyleLevel = "Cell"
                      	.ClientSideConditionalStyle = ""
                      	.ClientSideConditionalStyleLevel = "Cell"
                      	.QBEDisable = .f.
                      	.QBEInlineStyle = ""
                      	.canBeUsedInWhereClause = .t.
                      	.Type = "C"
                      	.Varname = "DESCRIPTION"
                      	.Column.LabelPosition = "Left"
                      	.Controltype = "Label"
                      	.Label.InLineStyle = ""
                      	.BreakType = "None"
                      	.nCols = 1
                      	.Column.Hide = .f.
                      	.Column.Heading = "Description"
                      	.Column.Sort = "Description"
                      end with
                      with tmpl.field_info[4]
                      	.Fieldname = "Size"
                      	.Scope = "Local"
                      	.DisplayFormat = ""
                      	.DisplayUnFormat = ""
                      	.ConditionalStyle = ""
                      	.ConditionalStyleLevel = "Cell"
                      	.ClientSideConditionalStyle = ""
                      	.ClientSideConditionalStyleLevel = "Cell"
                      	.QBEDisable = .f.
                      	.QBEInlineStyle = ""
                      	.canBeUsedInWhereClause = .t.
                      	.Type = "C"
                      	.Varname = "SIZE"
                      	.Column.LabelPosition = "Left"
                      	.Controltype = "Label"
                      	.Label.InLineStyle = "text-align: center;"
                      	.BreakType = "None"
                      	.nCols = 1
                      	.Column.Hide = .f.
                      	.Column.Heading = "Size"
                      	.Column.Sort = "Size"
                      	.Column.InLineStyle = "width: 80px;"
                      end with
                      with tmpl.field_info[5]
                      	.Fieldname = "Price"
                      	.Scope = "Local"
                      	.DisplayFormat = "alltrim(str(<value>,250,2,\"$(\"))"
                      	.DisplayUnFormat = ""
                      	.ConditionalStyle = ""
                      	.ConditionalStyleLevel = "Cell"
                      	.ClientSideConditionalStyle = ""
                      	.ClientSideConditionalStyleLevel = "Cell"
                      	.QBEDisable = .f.
                      	.QBEInlineStyle = ""
                      	.canBeUsedInWhereClause = .t.
                      	.Type = "N"
                      	.Varname = "PRICE"
                      	.Column.LabelPosition = "Left"
                      	.Controltype = "Label"
                      	.Label.InLineStyle = "text-align: right;"
                      	.BreakType = "None"
                      	.nCols = 1
                      	.Column.Hide = .f.
                      	.Column.Heading = "Price"
                      	.Column.Sort = "Price"
                      	.Column.InLineStyle = "width: 70px;"
                      end with
                      
                      tmpl.RecNav.SuppressIfOnlyOnePage = .t.
                      tmpl.RecNav.First_Label = "First"
                      tmpl.RecNav.Has_First_Button = .t.
                      tmpl.RecNav.Has_Last_Button = .t.
                      tmpl.RecNav.Has_Next_Button = .t.
                      tmpl.RecNav.Has_Prev_Button = .t.
                      tmpl.RecNav.HTML_Template_source = "Computed"
                      tmpl.RecNav.Justify = "Left"
                      tmpl.RecNav.Last_Label = "Last"
                      tmpl.RecNav.Next_Label = "Next"
                      tmpl.RecNav.Number_of_page_links = 10
                      tmpl.RecNav.Page_Numbering_Style = 1
                      tmpl.RecNav.PagesTemplate_w_PageCount = "{PageNumber} of {PageCount}"
                      tmpl.RecNav.PagesTemplate_wout_PageCount = "{PageNumber}"
                      tmpl.RecNav.Position = 1
                      tmpl.RecNav.suppress_recNavBar_if_no_records = .f.
                      tmpl.RecNav.Prev_Label = "Prev"
                      tmpl.RecNav.Show_disabled_controls = .t.
                      tmpl.RecNav.Show_Page_Count = .f.
                      tmpl.RecNav.Use_Images = .t.
                      
                      
                      tmpl.gridToolbarTemplate = <<%html%
                      %html%
                      tmpl.gridToolbarTemplateEditable = <<%html%
                      %html%
                      tmpl.style_name = "GradientBlue"
                      tmpl.style_type = "Alpha Five"
                      tmpl.UseSimpleStyles = .f.
                      tmpl.overrideStylesForJavascriptObjects = .f.
                      
                      tmpl.GUID = "caf494e3-9117-493d-86fc-3a89c7d41eb0"
                      
                      tmpl.onlyIncludeSelectedFieldsInQuery = .t.
                      Attached Files
                      Alpha 5 Version 11
                      AA Build 2999, Build 4269, Current Build
                      DBF's and MySql
                      Desktop, Web on the Desktop and WEB

                      Ron Anusiewicz

                      Comment

                      Working...
                      X