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

Newie Lost in creating a report

Integrated Application Platform › Forums › General › Newie Lost in creating a report

  • This topic has 1 reply, 2 voices, and was last updated 11 years, 4 months ago by amckinlay.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • September 14, 2011 at 2:45 pm #711
    Anonymous
    Inactive

    Hello, I am slowly starting to grasp this program. I have been out of programming for 20+ yrs and things have changed a bit. I am trying to general a report using a Master Detail. I have everything working except totaling the bale count. I am sure thats its something simple in the syntax that I am missing. Below is the code that I am using. Any help would be appreciated.

    //SSB Load Report
    #(Params
    title: “SSB Load Report”
    name: “ssb_load”
    Params:
    (Form
    (ParamsSelect load_num))
    QueryFormat
    {
    Query()
    {
    where = _report.GetParamsWhere(“load_num”)
    return “ssb_load” $ where $ ” sort load_num”
    }
    Output()
    {
    Object(“Vert”
    #(Vskip)
    #(Text, ” LOAD TOTALS”, font: #(name: ‘Arial’ size: 24 weight: 800))
    #(Text, ” Date Processed Load number”, font: #(name: ‘Arial’ size: 18 weight: 500))
    #(“Horz”
    #(Text, ” “, font: #(name: ‘Arial’ size: 16))
    #(date_proc, font: #(name: ‘Arial’ size: 16))
    #(Text, ” “, font: #(name: ‘Arial’ size: 16))
    #(load_num, font: #(name: ‘Arial’ size: 16 weight: 500)))
    #(Vskip)
    #(Vskip)
    #(‘Horz’
    #(Text, “Location: “, font: #(name: ‘Arial’ size: 18))
    #(ld_loc, font: #(name: ‘Arial’ size: 18)))
    #(Vskip)
    #(Vskip)
    #(Vskip)
    #(Vskip)
    #(Text, ” Al Cans Drink bottles Pill Bottles OW Hangers Platic Film Books Trash CB”, font: #(name: ‘Arial’ size: 12))
    #(“Horz”
    #(ld_al_wt, font: #(name: ‘Arial’ size: 12))
    #(Text, ” “, font: #(name: ‘Arial’ size: 16))
    #(ld_drink_wt, font: #(name: ‘Arial’ size: 12))
    #(Text, ” “, font: #(name: ‘Arial’ size: 16))
    #(ld_pill_wt, font: #(name: ‘Arial’ size: 12))
    #(Text, ” “, font: #(name: ‘Arial’ size: 16))
    #(ld_ow_wt, font: #(name: ‘Arial’ size: 12))
    #(Text, ” “, font: #(name: ‘Arial’ size: 16))
    #(ld_hanger_wt, font: #(name: ‘Arial’ size: 12))
    #(Text, ” “, font: #(name: ‘Arial’ size: 16))
    #(ld_film_wt, font: #(name: ‘Arial’ size: 12))
    #(Text, ” “, font: #(name: ‘Arial’ size: 16))
    #(ld_book_wt, font: #(name: ‘Arial’ size: 12))
    #(Text, ” “, font: #(name: ‘Arial’ size: 16))
    #(ld_trash_wt, font: #(name: ‘Arial’ size: 12))
    #(Text, ” “, font: #(name: ‘Arial’ size: 16))
    #(ld_cb_wt, font: #(name: ‘Arial’ size: 12)))
    #(Vskip)
    #(Vskip)
    #(Text, ” Store num Num bales”, font: #(name: ‘Arial’ size: 14))
    )
    }
    After_load_num(data)
    {
    .Append(Object(QueryFormat
    {
    tot_bales: 0
    Query()
    {
    // .tot_bales += .num_bales
    return “ssb_ld_bales where load_num is ” $ Display(.Hdr.load_num)
    }
    Before()
    {

    return false
    }

    Output()
    {
    Object(‘Horz’
    #(store_num, font: #(name: ‘Arial’ size: 14))
    #(Text, ” “, font: #(name: ‘Arial’ size: 14))
    #(num_bales, font: #(name: ‘Arial’ size: 14)))

    }
    }

    Hdr: data))

    .Append(Object(‘Vert’,
    #(Vskip)
    #(Vskip)
    #(‘Horz’
    #(Text, “Total Bales “, font: #(name: ‘Arial’ size: 14))
    #(tot_bales, font: #(name: ‘Arial’ size: 14))
    )))
    return ‘pg’
    }
    }

    )

    Thanks
    Benny

    September 14, 2011 at 4:33 pm #888
    amckinlay
    Keymaster

    I would suggest keeping the total inside the sub-report, using the Total option in QueryFormat (see the help). Otherwise it will be hard to get the total “out” of the sub-report.

    Another option is to just do a separate QueryTotal to get the total. (Somewhat redundant, but simple.)

    One thing to remember is that reports run somewhat “asynchronously”. They don’t necessarily execute in the order that you might expect, making it difficult (or impossible) to pass variables around.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 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