Display Value different from Underlying Value |
Post Reply |
Author | |
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
Posted: 15 April 2009 at 7:56pm |
Is it possible to have display values that are different from the underlying values in a cell?
For example, if I have a Date column, I might store the underlying data in ISO8601 format, but then I would like to display friendly names for certains dates (i.e. the underlying data for today would be 2009-04-15T20:07Z, but I would like the ReportControl cell to show "Today at 3PM" (time adjusted for time zone)). Older dates might show "Yesterday" or "Last Week", etc... instead of the full date. However, because the underlying data stores actual database values, sorting and searching would take place on those values instead of on the displayed (cosmetic only) values. Is this possible with the ReportControl currently? |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Okay, I think I have figured out how to do this with BeforeDrawRow event custom handling of the Metrics object. I will post a sample at some point if all goes well.
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
MNovaro
Groupie Joined: 20 June 2006 Status: Offline Points: 71 |
Post Options
Thanks(0)
|
Wouldn't be easier to set the .Caption of the record Item when you populate the report:
Item.Value = 2009-04-15T20:07Z Item.Captin = "Today at 3PM" HTH |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Thanks Marco. That's useful information (that the Value property can be separate from the Caption property, and I assume the ReportControl sorts on the Value property). The reason I am now using the BeforeDrawRow event is because I am working with the ReportControl in VirtualMode (since I haven't been able to get Bound mode to work with my SQLite database provider yet).
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
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 |