Normal Topic Not Repeating Element Names In A Report (Read 2606 times)
wildwood
Full Member
***
Offline


No personal text

Posts: 156
Location: New York
Joined: Apr 2nd, 2004
Not Repeating Element Names In A Report
Nov 8th, 2004 at 3:07am
Print Post Print Post  
I would like to print out a report as i did in Q&A with the following result:

  GROUP              LAST NAME                    HP#
  -----------            ----------                    -------------
CEDAR/PINES      Baskin                    (293)172-0387
                          Collins                    (345)772-0387
                          Dunning                 (367)956-5777
                          Elkins                     (278)798-0283
                          Hiorne                   (478)121-7300
                          Jones                    (789)937-3745

In Sesame the report prints out with the Group elements constantly repeating:


GROUP              LAST NAME                    HP#
  -----------            ----------                    -------------
CEDAR/PINES      Baskin             (293)172-0387
CEDAR/PINES      Collins             (345)772-0387
CEDAR/PINES      Dunning          (367)956-5777
CEDAR/PINES      Elkins              (278)798-0283
CEDAR/PINES      Hiorne             (78)121-7300
CEDAR/PINES      Jones               (789)937-3745

How do I get the Group element repeating just once as I did in Q&A

Thanks,
Peter
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Not Repeating Element Names In A Report
Reply #1 - Nov 8th, 2004 at 3:48am
Print Post Print Post  
Try this, this is the way I get Sesame to print a value only the first time it is encountered.

Code
Select All
** PROGRAMMING SECTION: [ GLOBAL CODE ] [] **
stat CurrentCopy as string
stat DelayedCopy as string

** PROGRAMMING SECTION: [Group] [On Print] **
CurrentCopy = Group

if CurrentCopy = DelayedCopy
 clear(Group)

DelayedCopy = CurrentCopy 


  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
wildwood
Full Member
***
Offline


No personal text

Posts: 156
Location: New York
Joined: Apr 2nd, 2004
Re: Not Repeating Element Names In A Report
Reply #2 - Nov 9th, 2004 at 2:41am
Print Post Print Post  
Hey Carl,
Thanks!! with a little fine tuning I got it to work very nicely.
My question to you is how did you come up with the programming for the solution. I have searched the Sesame manuals and cannot find one page with an explanation of "DelayedCopy" or CurentCopy".
Gets a little frustrating when an old Q&A'er tries to find solutions that are'nt readily availbale in the manuals.

Peter
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Not Repeating Element Names In A Report
Reply #3 - Nov 9th, 2004 at 4:30am
Print Post Print Post  
You won't find them in the Sesame documents. Those names are just what I decided to name my static variables.

The basic technique is an old Q&A trick used within Derived Columns to trigger some event or calculation when there is a change in a sorted field.

In this case, we are sort of doing the opposite. As long as the "Group" value is the same as in the previous record, we are blanking it out.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
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: Not Repeating Element Names In A Report
Reply #4 - Nov 9th, 2004 at 2:39pm
Print Post Print Post  
Hello Peter,

There is another way to get very similar results without any programming at all.

Here is the Setup of the Report. The only things that you can't see is that everything in the group header I made Bold and LE6 is Invisible. **Edit** Also the group is set to break on LE6


Here is the output of the report minus the telephone numbers.
  

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



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Not Repeating Element Names In A Report
Reply #5 - Nov 9th, 2004 at 3:03pm
Print Post Print Post  
Ray,

You must have something else in there. I just tested it on my app, and the "Group", "Last Name", and "Telephone" headers only print once for the entire report.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
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: Not Repeating Element Names In A Report
Reply #6 - Nov 9th, 2004 at 3:16pm
Print Post Print Post  
ah I forgot the group is set to break on LE6. Break value of 0.
  

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



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Not Repeating Element Names In A Report
Reply #7 - Nov 10th, 2004 at 5:11am
Print Post Print Post  
I like it! Smiley

This sort of solves the complaint that I (and others) have had about the headers not printing at the top of each page.

I know they won't actually be printing at the top of the page exactly. But, if the groups are not too large, then there will be a row of headers somewhere nearby as a reference for what type of info each column contains.

Thanks for pointing out that technique.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
wildwood
Full Member
***
Offline


No personal text

Posts: 156
Location: New York
Joined: Apr 2nd, 2004
Re: Not Repeating Element Names In A Report
Reply #8 - Nov 10th, 2004 at 6:19am
Print Post Print Post  
Hey you guys are extremely helpful.
Ray and Carl my Yankee cap goes off to you.

Thanks,
Peter
  
Back to top
 
IP Logged