Print Page | Close Window

Column Format

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=19353
Printed Date: 23 November 2024 at 7:53pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Column Format
Posted By: yfphang
Subject: Column Format
Date Posted: 24 December 2011 at 6:00am
Hi, How to change all to column with format "0.00"

Thank.




Replies:
Posted By: Xander75
Date Posted: 04 January 2012 at 5:41am
Hi,

Try formatting the value using "FormatNumber(value, 2)", this is Visual Basic 6 code.

Please add a signature saying what language(s) you are using as it will help with responses.


-------------
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)


Posted By: yfphang
Date Posted: 06 January 2012 at 12:34am
Thank for reply,
currently i am using below code to manual convert last column to decimal point, i found that is to troublesome, just to find out any other quick way to do it.
i am using classic Visual Basic 6.0

my code
With DataLst
.Columns(.Columns.Count - 1).HeaderAlignment = xtpAlignmentRight
.Columns(.Columns.Count - 1).Alignment = xtpAlignmentRight

For k = .Columns.Count - 1 To .Columns.Count - 1
    For i = 0 To .Rows.Count - 1
            xx = Format(.Records(i).Item(k).Caption, "#0.00")
           .Records(i).Item(k).Caption = xx
    Next i
Next k

End With



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net