Normal Topic Decimal Places in Merge Document (Read 1746 times)
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Decimal Places in Merge Document
Jan 18th, 2015 at 8:33pm
Print Post Print Post  
I have a database field called Table Number that contains whole numbers only e.g. 1, 10, etc. and that's the way it appears in my database.

I don't remember ever having this problem; however, when I use that number field in a merge document, it is followed by a decimal point and 8 zeroes.

1 becomes 1.00000000
10 becomes 10.00000000

I want the merged fields to show whole numbers only, just as it does in the database.

What do I need to do to fix this?

Thanks!


  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Decimal Places in Merge Document
Reply #1 - Jan 20th, 2015 at 8:29pm
Print Post Print Post  
What are you using get the data out of Sesame for the merge? Are you using MergeFilePrint() or WordMerge?
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Decimal Places in Merge Document
Reply #2 - Jan 20th, 2015 at 10:53pm
Print Post Print Post  
Word Merge
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Decimal Places in Merge Document
Reply #3 - Jan 21st, 2015 at 7:58am
Print Post Print Post  
Which version of WordMerge?

WordMerge has been using @AsFormattedByLE since at least version 2.44, which was released with Sesame 2.1 in November of 2008. The use of @AsFormattedByLE means that money and number values should appear in Word exactly the same way you see them on your Sesame form.

If you are using an older version of the WordMerge code, you really need to update it. If not, then we'll have to dig a bit more.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Decimal Places in Merge Document
Reply #4 - Jan 21st, 2015 at 2:58pm
Print Post Print Post  
Carl -

Maybe I misunderstood when you asked if I was using "WordMerge" because what you just said is not familiar to me.

I am using Microsoft Word Version 2010

If it takes "figuring out" perhaps it's not worth the trouble.  I merged the document and simply did a "replace" of the .00000000 with "nothing".  Smiley

I was just curious because I never had this happen before and I am not aware of anything that I did differently.  As far as I know the number field itself is set to NOT display any decimals.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Decimal Places in Merge Document
Reply #5 - Jan 21st, 2015 at 8:09pm
Print Post Print Post  
Do you mind posting the code that performs your merge? That way, I should be able to determine what is going on.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Decimal Places in Merge Document
Reply #6 - Jan 21st, 2015 at 9:11pm
Print Post Print Post  
Carl -

I'm not sure what "code" you are referring to, so let me tell you the way I did this particular merge.

I retrieved the records I want from a database

I exported the appropriate fields and save it into a file called mergeinfo.csv .  The export looks like this, for the "number" field:

Table
9
11
11
2
6
6

I open an MS Word document that has an "insert merge field" that looks like this:

Table «Table»
Table «Table»
Table «Table»
Table «Table»
Table «Table»
Table «Table»

When I "preview" or actually merge the data in MS Word, this is what I get:

Table 9.00000000
Table 11.00000000
Table 11.00000000
Table 2.00000000
Table 6.00000000
Table 6.00000000

I can't seem to get the "image" insert to work, but if you click on the following link, you'll see an example of one of the finished products.  Look at TABLE on the bottom of the merged form.

https://www.dropbox.com/s/4tb537utdhjpyo1/Capture.JPG?dl=0

Once again, I have already completed my merges, so it is not "critical" for me.

  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Decimal Places in Merge Document
Reply #7 - Jan 22nd, 2015 at 8:07am
Print Post Print Post  
If you routinely merge Sesame data with Word document, you really should check out the "WordMerge" method.
  


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



Posts: 320
Location: Amherst, NH
Joined: Aug 2nd, 2010
Re: Decimal Places in Merge Document
Reply #8 - Jan 30th, 2015 at 3:38pm
Print Post Print Post  
We use a lot of mail merge in our application.  the format that I use is {MERGEFIELD "GRAMSSLUG"\#0.00}.

THIS FORMAT (#0.00) PLACED AFTER THE MAIL MERGE ELEMENT WILL PROVIDE UNLIMITED NUMBERS BEFORE THE DECIMAL POINT AND TWO DECIMAL PLACES AFTER THE DECIMAL POINT.
  
Back to top
 
IP Logged