Search
Friday, October 10, 2008 ..:: Forum ::.. Register  Login
 
  Forum  Templates  AutoTag  How do I prevent a number from rounding up?
Previous Previous
 
Next Next
New Post 6/6/2008 1:00 PM
Unresolved
  margaret
2 posts
No Ranking


How do I prevent a number from rounding up? 

<wr:out value="23.5" type="NUMBER" pattern="0"/>

This outputs 24 in the report.  I would like it to display 23 regardless of the number after the decimal.  Is there a way to do this with Auto Tag in Word?

 
New Post 6/24/2008 4:50 PM
  tomasr
9 posts
No Ranking


Re: How do I prevent a number from rounding up? 

Hi, Margaret

I find that the easiest way to do this is by using the xpath floor funciton:

<wr:out select="floor(23.5)" type="NUMBER" pattern="0" datasource="car"/>

and make sure to use the select instead of value when using xpath attributes in the out tag.

- Tomas

 
Previous Previous
 
Next Next
  Forum  Templates  AutoTag  How do I prevent a number from rounding up?
Membership Membership:
Latest New User Latest: mooncui
New Today New Today: 0
New Yesterday New Yesterday: 0
User Count Overall: 59

People Online People Online:
Visitors Visitors: 0
Members Members: 0
Total Total: 0

Online Now Online Now:
All contents copyright (c) 2002 - 2008 by Windward Studios, Inc. All Rights Reserved.   Terms Of Use  Privacy Statement