Normal Topic Views (Read 1397 times)
Foster
Ex Member


Views
Oct 6th, 2004 at 4:45pm
Print Post Print Post  
I need to understand Views more then what I find in the manual.  I can't get Inside Sesame, so that source of help is out.  Cry  In reports I add a new view to get grand totals to line up.  The new view is after header and I just put in grand total view.  Got report with 0 after header and then rest of report.  Do I need a complete copy of view 1 in View 2?  Can I copy view 1 as view 2 or do it from scratch?  What am I printing:  both views, view 1, or view 2?  Thanks for helping me understand views better.
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Views
Reply #1 - Oct 6th, 2004 at 5:40pm
Print Post Print Post  
Hello Foster,

There is an example of this under the Sample Applications settings. It can be found at http://www.lantica.com/Forum2/cgi-bin/yabb/YaBB.pl?board=samples;action=display;...

The new view that you just added will be after your first view. If you look in the example you will see the only thing in the Second view appears in the Group Header,  you do not want to put it in the group body as it would repeat once for each record that you retrieved.

Most of the programming in the sample you can ignore, because it has nothing to do with group totals. You will need programming in three separate events. The first one is Global Code. The code in this event would read
Code
Select All
Stat gsGrandTotal as Int

gsGrandTotal = 0
 



The second place where code is needed is in the On Print event of the Value Box that you are totaling. For example lets say that the Report Block is named "Cost", In the example it is LE3. The following would go in the Cost on Print event.
Code
Select All
gsGrandTotal += Cost
 



The third and last place where code is needed is in the On Print event of a unbound value box in the group header in the second view. In the example it is named LE7, you can name it whatever you like. Your code would look like the following, MyGrandTotal is the name of the Value Box.
Code
Select All
MyGrandTotal = gsGrandTotal
 



You will then need to set the Width statements for the columns in both views.  This is necessary so the second view lines up with the columns in the first view.

You are printing both views. The one with the data first and then comes the view that only displays the Grand Total.
  

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