Suneido

Integrated Application Platform

  • Home
  • Learning
    • Suneido Manual
    • Beginners
      • Inside Suneido
      • The Suneido Programming Language
      • The Suneido Database
      • Installing Suneido
      • Building Suneido
      • IDE Go To Tour
      • Upgrading To A New Release
    • Advanced
      • Canvas Control
      • DrawControl Part 1
      • DrawControl Part 2
      • DrawControl Part 3
      • SAX Like XML Processing
      • A Plug-In Architecture
      • A Simple Wizard Framework
      • An HTML Include Facility
      • An RSS 2 Feed Creator
      • MIME Generation
      • A New Add-on Facility
      • Workspace Improvement Hack
    • Mockito for Suneido
    • The Suneido Task Scheduler
    • Contributing To Suneido
    • Contributor Assignment of Copyright
    • Language Translation
    • Future Directions
    • Interview With Andrew Mckinlay
  • Forum
    • Announcements
    • Internals & Enhancements
    • Cookbook
    • General
  • FAQ
  • Screenshots
  • Downloads
  • Links

Putting column totals on screen

Integrated Application Platform › Forums › General › Putting column totals on screen

  • This topic has 6 replies, 2 voices, and was last updated 11 years, 4 months ago by Anonymous.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • September 20, 2011 at 8:52 pm #712
    Anonymous
    Inactive

    I want to thank you in advance for the help that you have given me. I am slowly learning. I have a simple problem that I cant figure out what I’m doing wrong. I want to total several columns in a table and display on screen showing current inventory. I have the Controller set up and rules that query the table. The rule function generates the data but is not filling in the fields on screen below is the code that I am trying to use:

    Rule_tot_ld_drink_wt
    function()
    {

    return QueryTotal(‘ssb_load’ ‘ld_drink_wt’)
    }

    Rule_tot_ld_al_wt
    function()
    {

    return QueryTotal(‘ssb_load’ ‘ld_al_wt’)
    }

    Controller
    {
    keep_placement: true
    Xstretch: 1
    Ystretch: 1
    Title: “SSB Inventory”
    Controls:
    (Vert
    #(Static ‘ Wagram Paperstock SSB Inventory’, font: ‘Arial’ ,size: 18 ,weight: 600)
    #(Skip)
    #(Skip)
    (Horz
    #(Static ‘ Inventory Totals as of :’, font: ‘Arial’ ,size: 18 ,weight: 300)
    )
    #(Skip)
    #(Skip)
    #(Skip)
    #(Skip)
    #(tot_ld_al_wt)
    #(tot_ld_drink_wt)
    )

    }

    Thanks
    Benny

    September 20, 2011 at 9:31 pm #889
    amckinlay
    Keymaster

    Rules only work in records. To use them in a screen you need to use a RecordControl. e.g.

    Controls: (Record (Vert
    ...
    ))

    The RecordControl only has to be around the data fields, but then you’d have to put them in another Vert so it’s easier to wrap it around everything.

    September 21, 2011 at 3:26 pm #890
    Anonymous
    Inactive

    I tried that and now nothing prints to the window. Below is a simplified version just to get it working. Let me know if there is another way to put totaled columns to the screen. I tried it without the Object in front of the Vert ans was getting a syntax error. Im still using the same rules posted above.

    Controller
    {
    Xstretch: 1
    Ystretch: 1
    Title: “SSB Inventory”
    Controls:
    Record(
    Object(Vert
    (tot_ld_al_wt)
    (tot_ld_drink_wt)
    (Static ‘ Wagram Paperstock SSB Inventory’, justify: ‘CENTER’, font: ‘Arial’ ,size: 18 ,weight: 600)
    ))
    }

    September 21, 2011 at 3:29 pm #891
    Anonymous
    Inactive

    Oh. I see one prob. I had an extra set of (). but removind the Object in front of the Vert still is not working for me.

    September 21, 2011 at 3:32 pm #892
    Anonymous
    Inactive

    Now I am getting empty fields on the screen. The Rules still done seem to be working.

    September 21, 2011 at 8:17 pm #893
    amckinlay
    Keymaster

    Sorry, I missed one part. For some reason (long standing quirk), the rules don’t run until you Set the RecordControl. Try adding:

    New()
    {
    .Data.Set(Record())
    }

    (“Data” is the name of the RecordControl)

    September 22, 2011 at 1:23 am #894
    Anonymous
    Inactive

    Thanks. That seems to have done the trick. I will fully implement it tomorrow. Its help like this that sold me on using Suneido. I should be able to finish this project now.

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Log In

Search Forums

Log In
Welcome to the new Suneido Web Site and Forum.
Register
Lost Password
users of the previous PHPBB Forum should be able to log in with their previous username and password.

Recent Topics

  • Alpha copy of gSuneido to play with
  • how to start jsuneido ?
  • Problem Starting Suneido…
  • Dialog not showing buttons
  • New link for Suneidojo

Contact Us | Legal Statement | Privacy Statement | SiteMap

Copyright © 2023 Axon® Development Corporation. All Rights Reserved. - Open Source Integrated Database and Programming Language