Alpha Video Training
Results 1 to 5 of 5

Thread: placing group break totals in the report footer

  1. #1
    Member
    Real Name
    ed taylor
    Join Date
    May 2000
    Location
    calgary alberta canada
    Posts
    552

    Default placing group break totals in the report footer

    hi:

    i have a report that has group breaks based on the material that a truck is applying to a road surface. the materials are sand, salt, matl1 and matl2. each group break gives me the total applied distance and weight of material correctly. what i want to do is to place these totals (for all 4 material types) into the report footer as a summary. how can i do this? ... i'm sure it's easy, but i just can't seem to grasp it right now.

    thanks in advance.

    regards,

    ed

  2. #2
    Member
    Real Name
    ed taylor
    Join Date
    May 2000
    Location
    calgary alberta canada
    Posts
    552

    Default RE: placing group break totals in the report foote

    hi:

    there has to be an easier way than the following xbasic (which will probably get clobbered in the post due to huge line sizes):

    salt_spread=tablesum("master32","m_material='Salt'.and.m_truck=var->id.and.between(m_date,var->rpt_start,var->rpt_zfinish)","m_sprd_qty")
    salt_blast=tablesum("master32","m_material='Salt'.and.m_truck=var->id.and.between(m_date,var->rpt_start,var->rpt_zfinish)","m_blst_qty")
    salt_total=salt_spread+salt_blast
    sand_spread=tablesum("master32","m_material='Sand'.and.m_truck=var->id.and.between(m_date,var->rpt_start,var->rpt_zfinish)","m_sprd_qty")
    sand_blast=tablesum("master32","m_material='Sand'.and.m_truck=var->id.and.between(m_date,var->rpt_start,var->rpt_zfinish)","m_blst_qty")
    sand_total=sand_spread+sand_blast
    matl1_spread=tablesum("master32","m_material='Matl1'.and.m_truck=var->id.and.between(m_date,var->rpt_start,var->rpt_zfinish)","m_sprd_qty")
    matl1_blast=tablesum("master32","m_material='Matl1'.and.m_truck=var->id.and.between(m_date,var->rpt_start,var->rpt_zfinish)","m_blst_qty")
    matl1_total=matl1_spread+matl1_blast
    matl2_spread=tablesum("master32","m_material='Matl2'.and.m_truck=var->id.and.between(m_date,var->rpt_start,var->rpt_zfinish)","m_sprd_qty")
    matl2_blast=tablesum("master32","m_material='Matl2'.and.m_truck=var->id.and.between(m_date,var->rpt_start,var->rpt_zfinish)","m_blst_qty")
    matl2_total=matl2_spread+matl2_blast


    regards,

    ed

  3. #3
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: placing group break totals in the report foote

    Once the expression has been generated for a group total/average/whatever, it doesn't matter where in the report you place the calculated field.

    The calculation is done in pre-processing for the report and can be placed in the report header or the detail section.

    IOW just move the fields to where you want them and specify "value in field" if prompted.

  4. #4
    Member
    Real Name
    ed taylor
    Join Date
    May 2000
    Location
    calgary alberta canada
    Posts
    552

    Default RE: placing group break totals in the report foote

    hi stan:

    thanks for your reply!

    unfortunately i must not have communicated my situation correctly (or i'm missing something in your explanation). when i run the report it will have made 4 group breaks based on a change in material type. in the material group footer it will display the totals (distance and weight) for that material type correctly. i want to place a summary of these totals in the report footer to look something like this: (note this is an abbreviated example for clarity)

    material_____distance______weight

    salt__________100.5________1234.0
    sand__________150.6________4567.8
    matl1_________234.5________2314.0
    matl2_________435.3________4435.9

    the distance and weight values would be generated at each group break.

    thanks again stan, it may just be another erratnt firing synapse on my pasrt. your help is greatly appreciated!

    regards,

    ed

  5. #5
    Member
    Real Name
    ed taylor
    Join Date
    May 2000
    Location
    calgary alberta canada
    Posts
    552

    Default RE: placing group break totals in the report foote

    hi stan:

    i saw your reply to another similar post re summary details in the report footer. just switched the numeric value of 1 to the field and presto! it works like a charm. never knew you could do that with calculated fields. they run on every line of the report detail within the selection criteria.

    thanks stan!!!

    regards,

    ed

Similar Threads

  1. Report Group Break
    By Kathy McMillan in forum Alpha Five Version 5
    Replies: 3
    Last Post: 09-03-2004, 05:11 AM
  2. Post from Group Footer in Report
    By Roy Viken in forum Alpha Five Version 5
    Replies: 2
    Last Post: 03-25-2004, 08:10 AM
  3. FYI Group Total Results in Report Footer
    By Alan Lucas in forum Alpha Five Version 5
    Replies: 0
    Last Post: 05-25-2003, 05:18 PM
  4. Group Totals in Report Footer
    By Alan Lucas in forum Alpha Five Version 5
    Replies: 8
    Last Post: 05-25-2003, 04:59 PM
  5. report footer totals for group summary
    By eeetee in forum Alpha Five Version 5
    Replies: 2
    Last Post: 03-01-2003, 12:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •