Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Format thousands separator
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Format thousands separator

 Post Reply Post Reply
Author
Message
DavidSpain View Drop Down
Newbie
Newbie


Joined: 18 March 2009
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote DavidSpain Quote  Post ReplyReply Direct Link To This Post Topic: Format thousands separator
    Posted: 21 May 2009 at 12:57pm
Hello friends!

Regarding the formats of cell in the report grid,
We have seen that there are plenty of potential.
However, we do not know how to do that in the case
digital formats, separate the thousands:

For example:
1234  -->  1.234
100000  --> 100.000
5876154 --> 5.876.154

Is there any way through format property?

We can pass it as text, but then it does not order the data correctly.

Many thanks in advance.


Product: Xtreme SuitePro (ActiveX) version 13.0.0
     Platform: Windows XP (32bit) - SP 2
     Language: Visual Basic 6.0
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 22 May 2009 at 4:45am
Hi,
 
If you assign values (numbers) to ReportItems it will sort correctly (even without any format).
 
Set rec = wndReportControl.Records.Add()
        Set recItem = rec.AddItem(i) 'Sort OK
        
        Set recItem = rec.AddItem(i & " Kb") 'Sort not OK
        
        Set recItem = rec.AddItem(i) 'Sort OK
              recItem.Format = "%s Kb "
 
        Set recItem = rec.AddItem(FormatNumber(i / 3, 2))
              recItem.Format = "%s kb 'Sort not OK 
              recItem.SortPriority = i / 3 'Now it sorts OK
But you have to be carefull with SortPriority: Public Property SortPriority() As Integer
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
DavidSpain View Drop Down
Newbie
Newbie


Joined: 18 March 2009
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote DavidSpain Quote  Post ReplyReply Direct Link To This Post Posted: 22 May 2009 at 5:46am
First step with the value formatted text and then pass the same numerical value to the property sortpriority.

It works!

Thank you, Aaron!

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 23 May 2009 at 8:32pm
Did somebody tried to use formated values in PropertyGrid? Regional settings can use decimal point or comma also use comma as thousand saparators and so on. Same question about currency values.
 
btw - each ReportRecordItem have Format property so you can keep value as common sense sortable and present it in the item caption after format applied
 
We can also add Column-based format which can be apply for any item of  thic column (easy assing in the code).  
Next step - use internal UnitManager which can convert on-fly any unitized value from permanent unit to dynamic presentation unit so app can run in different countries and connected to same common database
We also need to think about more rich set of column (item) types (e.g. support images or other blob data)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.