Format thousands separator |
Post Reply |
Author | |
DavidSpain
Newbie Joined: 18 March 2009 Status: Offline Points: 7 |
Post Options
Thanks(0)
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
DavidSpain
Newbie Joined: 18 March 2009 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
First step with the value formatted text and then pass the same numerical value to the property sortpriority.
It works! Thank you, Aaron! |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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)
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |