Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

#s in numeric field - How to find length

Status
Not open for further replies.

kutoose

Technical User
Sep 11, 2002
169
US
Please refer thread767-525139.

My report is having lots of calculated fields. I had the issue of the calculated fields more than the field length assigned to them. In that case #s will appear. I extended the fields now, its fine.

Any way I was asked to create a document which have maximum length of all the calculated fields. That means say for example for 'Net Sales Amount' field the max value is 99999.99

How will I find the maximum value a calculated field will hold ?
 
Use a MAXIMUM() of the LENGTH().

i.e., Place a formula in the details with the following:

length(totext({Orders.Order Amount},0,"")) //numeric

or

length({Customer.CompanyName}) //String

Right click and select Insert->Grand Total->Maximum

Now you can reference the field from within formulas, or just display them.

-k
 
Thanks synapsevampire,

But this is not I need.

This report will go to the customer. I only have a test database. So I need to tell the customer, this 'summary field display value only less than 99,999.99'. Like that. So I need to tell them the length these fields can accommodate. Is there any way I can find it from design mode itself?
 
This is dependent upon the font and size used.

For a Arial Western 10, you can fit a 2 decimal, 13 digit character number comfortably per 1 inch of width.

Right click the field and select Object Size and Position and use the width to calculate it based on the font, style and size you use.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top