Hot Topic (More than 10 Replies) Mailmerge & Subforms (Read 2690 times)
beagle
Junior Member
**
Offline


No personal text

Posts: 80
Location: australia
Joined: May 28th, 2004
Mailmerge & Subforms
Jul 28th, 2004 at 8:44am
Print Post Print Post  
Can anyone help

I have developed an application (invoice) that uses a subform to show the line items.

my problems show up when I try to produce a document that shows the line items using mail merge.

I have used the (excellent) wordmerge programming that came with the wordmerge demo app.

It works fine for the fields from the parent record - but the data from the subform just comes up blank.

any pointers would be greatfully welcomed.

ps i also want to be able to print labels using subform data.

many thanks in advance

[color=Blue][/color]
  
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: Mailmerge & Subforms
Reply #1 - Jul 28th, 2004 at 12:36pm
Print Post Print Post  
See Tom Marcellus' article on Invoices in March and April issues of Inside Sesame. 

The April issue has an example of the code you need to do that.  He uses an array to search the subform and combine into a Print String
  



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


No personal text

Posts: 80
Location: australia
Joined: May 28th, 2004
Re: Mailmerge & Subforms
Reply #2 - Jul 28th, 2004 at 9:41pm
Print Post Print Post  
Hi Bob,

Unfortunatly I don't subscribe to "Inside Sesame" - any chance of posting the code here ?

Many thanks

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


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Mailmerge & Subforms
Reply #3 - Jul 28th, 2004 at 9:49pm
Print Post Print Post  
One example of doing this can be found in the Sample Applications.
http://www.lantica.com/Forum2/cgi-bin/yabb/YaBB.pl?board=samples;action=display;...
  

- 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: Mailmerge & Subforms
Reply #4 - Jul 29th, 2004 at 1:23am
Print Post Print Post  
Quote:
Unfortunatly I don't subscribe to "Inside Sesame" - any chance of posting the code here ?

I think that might be a possible copyright problem.   I believe that the code in the issues is only available for use by subscribers, and I think that Tom's work should  be protected, so he will be motivated to continue his excellent works. 

Subscribe to Inside Sesame.  It is a great investment!  The code in that April issue that you want would pay for itself already! Grin

  



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


No personal text

Posts: 80
Location: australia
Joined: May 28th, 2004
Re: Mailmerge & Subforms
Reply #5 - Jul 29th, 2004 at 10:30pm
Print Post Print Post  
Thanks for your help - I understand the copyright situation.

However, as a general comment,
I'm sure this type of query is not an uncommon, given the market this product is aimed at.
It is a bit disapointing that programing examples (especially the more "advanced" examples) are a bit thin on the ground,

except for the "if you buy this extra subscription or add on etc..."

anyway thats my 2c worth


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


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Mailmerge & Subforms
Reply #6 - Jul 29th, 2004 at 10:36pm
Print Post Print Post  
The code example in the Samples area is free, readily available and doesn't require you to purchase anything extra. Did you take a look at it?
  

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


No personal text

Posts: 80
Location: australia
Joined: May 28th, 2004
Re: Mailmerge & Subforms
Reply #7 - Jul 30th, 2004 at 2:46am
Print Post Print Post  
Yes I did,

But I need some time to understand it & then see how I can adapt it  for mail merge rather than immediate printing via printstring commands - I was really after some pointers.

Since computing isn't my "real job" or background, I dont always get the time to try things out straight away.

I'm sure I'm not alone in this situation.

Although I am in a position to influence our companies needs - I have to be able to demonstrate the superiority of a product over existing packages (I believe sesame has that potential).
However our IT dept tends to rather sceptical of "outside" products .

I just feel that Lantica may be short changing themselves by going down the "it can be done - but you have to buy the magazine subscription route"

Wink
  
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: Mailmerge & Subforms
Reply #8 - Jul 30th, 2004 at 5:30am
Print Post Print Post  
The link that Erika pointed out is a FREE working example: 

Click on this link: [url]http://www.lantica.com/Forum2/cgi-bin/yabb/YaBB.pl?board=samples;action= display;num=1085334919[/url] for free code.  Use this code in conjunction with the Programming guides  to get a understanding of what is being done.  Any question on that code, ask here, and people willl be more than willing to help you out, but it is usually expected that you will do some work yourself.

All other database manager programs will also provide you with empty, non existent structures, manuals, examples of syntax, etc.  After that you must learn to do things yourself, or hire someone else to do it.  Not different from Sesame.

No other programs will give you direct interface with people involved in the development team who actually read the forums and respond.  Not only do they respond, but usually within minutes or hours, with good answers and solutions.  Putting a price tag on Customer Support is difficult but should not be overlooked in software evaluations.

You asked if I could provide the code from Inside Sesame and paste it here.  Going to the link Erika suggested is almost doing the same thing.  I don't understand why one solution is good, and the other, almost identical is not.  Would it solve your problem if I paste the information from her link into this forum instead?  How else can we help?

Subscribing to Inside Sesame is not a requirement.  It is a separate, non-related business.  All of the information in those issues is using the same code that you have in Sesame. 
Quote:
But I need some time to understand it & then see how I can adapt it  for mail merge rather than immediate printing via printstring commands - I was really after some pointers.
The monthly issues are like having your own personal tutor taking you through new examples and applications with every issue.  I think you can get a free sample issue, or see parts of some past issues, have you taken a look to see what is there?

The tone of this response is not intended to be critical, but to be helpful.  I guess I am frustrated by not being able to provide a solution that you can accept.

I see a number of options for you:
1.  Forget the whole thing.
2.  Try to do it yourself
3.  Use the samples and support provided from the forum
4.  Subscribe to third party publications..
5.  Hire Sesame consultant to work with you.
6.  Some combination of all of the above.

Hang in there,you will find the answer that is best for you.
  



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


No personal text

Posts: 80
Location: australia
Joined: May 28th, 2004
Re: Mailmerge & Subforms
Reply #9 - Jul 30th, 2004 at 10:05am
Print Post Print Post  
Hi Bob,

Your comments are taken as you meant them - i have a thick skin  Wink

I guess I may now be going off the track of my original question, but what the hell........

Sesame was aimed at "users" & small business people to be self sufficient - most of this category of people are probably not computer literate, "plug & play" is very much order of the day.

(like myself these users are not likley to have much in the way of programing skills, the small business owner is unlikley to have the time to spend hours or days figuring out programing minutae (unless the business is really small)

It is the enthusiast who is likley to spend ages figuring out how to program a particular task & I would guess these people are few & far between (as an example this forum has about 350 members, I really hope that Lantica has sold many times this number of packages)

To make Sesame more accessible may mean setting up  sample applications that can be used or adapted straight out of the box, Invoicing via merging data is one such application. Many databases ie Access & File Maker do this .

Having used Q&A for many years, and seeing the potential with Sesame (known affectionally by my companies IT dept as "sesame street" Roll Eyes ) I would just like to see it more widley used & to acheive that Sesame does need to be a little more "accessible" to non experts like myself. (this enables us to build applications that really are superior to those produced by IT departments (i'm speaking from personal experience here))

Once usage becomes more widespread then Sesame will gain of credibility among computer "profesionals" who have been taught the mantra "M*cros*ft or nothing"

Anyway........... that's my 2c worth






  
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: Mailmerge & Subforms
Reply #10 - Jul 30th, 2004 at 7:30pm
Print Post Print Post  
Hi Beagle

I don't disagree with your comments about the need for complete working business application to be included.  I have made that recommendation some time ago, and I believe that in time it will be available.  Using Northwind in Access as an example of what can be done.  That makes it much easier to demo the product's capabiliites to decision makers, seeing the final results and what can be done.

But I am looking at your issue from two perspectives.
!.  It would be nice to have that resource now, but it does not exist, and I suspect may not exist for another year or more!  Cannot control this, spend no more time on it.
2.  You have a problem now, and the first choice resource does not exist, so you have decide to come up a solution, and to ignore the problem.  Can control this, let's work to solve the current problem.

Ignoring it does not make it go away, so the way to address it now is to select from the only options available today. 

Thick skin is good.  If like mine, it's usually a result of scar tissue from many battles!  Enjoy! Grin
  



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


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Mailmerge & Subforms
Reply #11 - Jul 30th, 2004 at 9:00pm
Print Post Print Post  
Beagle,

Part of the reason why we haven't included an example of this particular task is because it involves dealing with what Word does, rather than with what Sesame does.

Using the technique described in MSKB #294686, I was able to get Word to do what you want.

I performed a hierarchical export from the sample Gems application, meaning I selected to export values from both the parent record and the subrecords. At the Export dialog I selected to export Field Headers. This produced an export file that looks like this:
Code
Select All
"Gem_Type","Gems!Shape","Gems!Color","Gems!Size"
"Alexandrite","Cushion","Exceptional","6.65x4.52mm"
"Alexandrite","Oval","Exceptional","6.52x4.84mm"
"Alexandrite","Radiant Emerald","Exceptional","9.80x5.92mm"
"Alexandrite","Round Mixed","Exceptional","5.90-5.95mm"
"Amethyst","Cushion","Exceptional","15x11mm"
"Amethyst","Freeform","Very Good","16x15mm"
"Amethyst","Freeform/Navette","Good","10x5mm"
"Amethyst","Oval","Good","14.5x12mm"
"Aquamarine","Emerald","Very Good","12x10mm"
"Aquamarine","Pear","Exceptional","9.5x7mm"
"Blue Sapphire","Brilliant","Very Good","4.5mm"
"Blue Sapphire","Oval","Exceptional","7x6mm"
"Blue Sapphire","Oval","Good","10.5x9mm"
"Blue Sapphire","Oval","Good","8.5x6.5mm"
"Blue Sapphire","Oval","Very Good","6x4mm"
"Blue Sapphire","Pear","Good","7x5.5mm"
"Diamond","Round","Colorless","2.5mm"
 



I then went into Word and created a merge document of type Directory. I set some tab stops so my data would  line up in nice columns. I attached my export file as the data source.

I entered merge codes that compared the key value (Gem_Type) from the current record to the key value in the previous record. If they don't match, a page break is inserted. Otherwise, the record info is merged in. The merge codes look like this:


Merge To New Document produces a merge document which meets your requirements and looks like this:


Once I knew what to do, it was pretty simple to set up (about 15 minutes), required no coding in Sesame, and required no VBA in Word. Once the Word doc is set up, it can just be opened and run. You do not need to keep doing the set up. Just export your current data, open Word and run your merge.
  

- 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: Mailmerge & Subforms
Reply #12 - Jul 30th, 2004 at 9:33pm
Print Post Print Post  
Way to go Erika! Grin
  



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


No personal text

Posts: 80
Location: australia
Joined: May 28th, 2004
Re: Mailmerge & Subforms
Reply #13 - Jul 31st, 2004 at 1:24am
Print Post Print Post  
WOW !,

Thanks guy's for your help, it really is very much appreciated. Cheesy

What other package would be able to provide such instant customer support & feedback

Again, I beleive Sesame has the potential to be a major player & i realise we are @ Version 1.x (just imagine what it will be like @ v 4.x !

  
Back to top
 
IP Logged