Normal Topic Sub Totals to Report Header (Read 610 times)
obfusc88
Full Member
***
Offline


No personal text

Posts: 194
Joined: Dec 17th, 2005
Sub Totals to Report Header
Sep 15th, 2007 at 11:28pm
Print Post Print Post  
Like I have many lines of records in the main report group.  At the end I can get a count of 150 records and a total of $50,000 but I want to show the 150 in the header and change the header text if count is less than 50K or more than 50K or some other rules.  But I need to do all the records and that happens after I do the header.

I thought that there was an explanation of how to get subtotals from the bottom of a report up to the top of the report but I can't find how to do that..Can an explanation be made here to tell how that workst?  Do I need to meake two grops where the the group 2 header gets the value from group 1 footer or something confusing like that?  Is there an example in the sample files.  Do I need to upgrade from version 1 to do this?  Thank you in advance for your help.

  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Sub Totals to Report Header
Reply #1 - Sep 16th, 2007 at 12:57pm
Print Post Print Post  
I've always liked using a report with multiple views for stuff like this. I make the fist view a summary "totals only" view with no detail. Just one line per group summarizing the results. The second view then lists the detail for all the groups. That way, Client can get a quick overview of the all the group totals, then go look at the detail section for any group that interests them.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Sub Totals to Report Header
Reply #2 - Sep 16th, 2007 at 7:13pm
Print Post Print Post  
Hmm,  I think we should be able to do something like Access' DCount,DSum,DAvg functions.

In the header section, we could make a loop to cycle through the report result set records, counting and getting totals for elements, and then calculating a TotalCount, TotalSum, and Average.  ResultSetTotal?


  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
obfusc88
Full Member
***
Offline


No personal text

Posts: 194
Joined: Dec 17th, 2005
Re: Sub Totals to Report Header
Reply #3 - Sep 18th, 2007 at 2:34am
Print Post Print Post  
I am not clear about the order that report sections are porcessed.  Is is just top top bottom or does it jump with extra groups? If I add another Group, the normal headings are1. report Heaser, 2. Page Header, 3. View Header, 4. Group Header1, 5. Group Header2, 6. Group Body, followed by the reverse -- Group Footer2, Group Footer1, View Footer, Page Footer and Report Footer.  IS that the order that information is processed in?

When I add a new View, it provides a whole new Group Header, GroupBody,Group Footer, and View Footer.  And each group can have new groups added.  So having a View like multiple reports in one report?  And if processing is top down, then I can get sut total results in TopView, make it invisible and display it in the Group Header in Lower View2?  Is that what you mean by making multiple Views?  I thought you meant to make two reports each with a different view, what I did not want to do.  Is there an example of this on any of the sample databases?
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Sub Totals to Report Header
Reply #4 - Sep 18th, 2007 at 1:34pm
Print Post Print Post  
obfusc88 wrote on Sep 18th, 2007 at 2:34am:
When I add a new View, it provides a whole new Group Header, GroupBody,Group Footer, and View Footer.  And each group can have new groups added.  So having a View like multiple reports in one report?


Yes that is correct. Multiple Views creates a multi-pass report.

Quote:
And if processing is top down, then I can get sut total results in TopView, make it invisible and display it in the Group Header in Lower View2? 


Yes that is what you would do. Make everything in the first view invisible and use programming to get the values from the first view into the second view.

Quote:
Is there an example of this on any of the sample databases?


If you look at http://www.lantica.com/Support/sesame_library.html there is two examples of multi-pass reports. They are labeled "Report Techniques 1" and "Report Techniques 2". Both show how to use two views in a report.

-Ray

  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged