CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 How to set the display to 2 Decimals?, thanks.

Print topic Send  topic

Author Message
joejac

Posts: 242
Posted: 01/11/2010, 8:56 AM

Hello,

I have a text box field and in

  
1.- Properties-Data-Data Type: Float  
2.- Properties-Data-Format: #,##0.00  

But it do not shows the 2 decimal places, I did other combinations with no success. Can somebody show me my mistake please, and provide the correct way to do it?.

I use PHP/MySQL CCS 4.3

Thanks and Regards
joejac
View profile  Send private message
datadoit
Posted: 01/11/2010, 11:44 AM

JJ make sure the database field is defined as an integer, not as text.
joejac

Posts: 242
Posted: 01/11/2010, 12:54 PM

Hello and thanks datadoit.

It is a text field that I use to show a price on the form dynamically when one listbox change. I populated the text field with an Ajax Autofill feature, and the field used to retrieve the price from the database is defined in MySQL as decimal(7,2), what do you think would be the problem?

Best regards
joejac
View profile  Send private message
datadoit
Posted: 01/11/2010, 4:07 PM

Not familiar with how CCS's Ajax Autofill handles integers. Javascript
will notoriously round numbers if not explicitly declared properly
(declaring as var instead of as int, for example). I'd suggest sending
your page to support. May be a fix that could benefit everyone later.

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.