Normal Topic Summary Reports (Read 830 times)
MP
Full Member
***
Offline



Posts: 104
Joined: Sep 3rd, 2007
Summary Reports
Dec 12th, 2007 at 4:44pm
Print Post Print Post  
I'm trying to generate a summary report in Sesame 2.0.4.  This report excludes all of the line item details and simply prints the subtotals.  The roadblock I'm having is that I can't find a way to reliably print the Group By column in the Group Footer.  For example, I'm trying to summarize sales by date.  I don't want to print all of the individual sales transactions.  I just want, by date, a line item in the report that shows my sales figures.  The problem is, how do I print the date being used in the grouping?  Here's what I've done:

1) Added the date and the sales figure fields to the Group Body.
2) Set the group to group by the date field, with a break of 1(*).
3) Add sum fields to the group footer.
4) Add a field bound to the date in the group footer.

The problem is with step four.  The date that's printed is the last date in the report.  It's not the date that was used by the group.  I'm not surprised actually, considering how the date grouping logic allows you to group on X number of days.  This means that the group value can be indeterminate if X > 1.  Is there any workaround that would allow me to output the date in the group footer?  I've tried using a static variable, setting the value of this variable in the On Print event of the date field in the Group Body, with no success.

(*) Note that when grouping on a date, a Break Value of 0 does not break on each individual date, as the documentation implies.  You need to use a Break Value of 1 to break whenever the date changes.

PS - I'm also having a problem with the Page Header.  It's not being output when I do an HTML Preview of the report.  It is being output when I do a Print Only Preview.
  
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: Summary Reports
Reply #1 - Dec 12th, 2007 at 5:19pm
Print Post Print Post  
MP wrote on Dec 12th, 2007 at 4:44pm:
I'm trying to generate a summary report in Sesame 2.0.4.  This report excludes all of the line item details and simply prints the subtotals.  The roadblock I'm having is that I can't find a way to reliably print the Group By column in the Group Footer.  For example, I'm trying to summarize sales by date.  I don't want to print all of the individual sales transactions.  I just want, by date, a line item in the report that shows my sales figures.  The problem is, how do I print the date being used in the grouping?  Here's what I've done:

1) Added the date and the sales figure fields to the Group Body.
2) Set the group to group by the date field, with a break of 1(*).
3) Add sum fields to the group footer.
4) Add a field bound to the date in the group footer.

The problem is with step four.  The date that's printed is the last date in the report.  It's not the date that was used by the group.


It's going to be the value from the date field in the record that caused the break or the last record if it is the final break.

Quote:
I'm not surprised actually, considering how the date grouping logic allows you to group on X number of days.  This means that the group value can be indeterminate if X > 1.  Is there any workaround that would allow me to output the date in the group footer?  I've tried using a static variable, setting the value of this variable in the On Print event of the date field in the Group Body, with no success.


You add the Date element to the goup header, set it to be invisible and use a static variable to store the value. Then in the footer you use an unbound value box to display that static variable.

Quote:
(*) Note that when grouping on a date, a Break Value of 0 does not break on each individual date, as the documentation implies.  You need to use a Break Value of 1 to break whenever the date changes.


No, You will want to use D to break on each individual date. A break value of 1 will break on every other day.

Quote:
PS - I'm also having a problem with the Page Header.  It's not being output when I do an HTML Preview of the report.  It is being output when I do a Print Only Preview.


HTML does not have the concept of Pages. Those sections are really only for the Print Only reports.

-Ray
  

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



Posts: 104
Joined: Sep 3rd, 2007
Re: Summary Reports
Reply #2 - Dec 13th, 2007 at 4:22am
Print Post Print Post  
Can you use summary fields in derived fields if the derived fields are in the same group footer as the summary fields?  I've had no luck accessing the summary data so far, but maybe it's an unsupported feature.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Summary Reports
Reply #3 - Dec 13th, 2007 at 1:36pm
Print Post Print Post  
MP wrote on Dec 13th, 2007 at 4:22am:
Can you use summary fields in derived fields if the derived fields are in the same group footer as the summary fields?  I've had no luck accessing the summary data so far, but maybe it's an unsupported feature.


You can do it by using @Attribute. The ATTR_ID_REPORT_SUM, ATTR_ID_REPORT_HIGH, ATTR_ID_REPORT_LOW, and ATTR_ID_REPORT_COUNT attributes hold the summary info for the different kinds of summary elements.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
MP
Full Member
***
Offline



Posts: 104
Joined: Sep 3rd, 2007
Re: Summary Reports
Reply #4 - Dec 13th, 2007 at 8:14pm
Print Post Print Post  
Thank you both.   Smiley
  
Back to top
 
IP Logged