Discussion:
Hint regarding redifinition of text in table
(too old to reply)
Anders Balslev
2008-06-06 06:41:33 UTC
Permalink
Hi Rave
Since your own newsgroup are still down, I try to reach you here.

I have Rave Report BEX 7.0.5
BDE 2006

I have searche anywhere in the doc's, and I cant really find the answer on
my question:

If I have a table on my datamodule, in this I have an integer field

I have a Rave report that must reflect this integer field
-So far so good

Say - if the integerfield reflects the color of something
Value 1 : color "blue"
Value 2 : color "red"
Value 3 : color "green"

On my BDE IDE I of course can make use of "OnGetText" event on my Tfield
component, and this works.

However, I have some reason, that I do not want to make use of the OnGetText
of my TField component.
But I still want to reflect the color name on the RaveReport. So - on the
report, I would have "blue", "red" or "green" rather than "1", "2" or "3"

Is this done within the Rave report design page, or cann it be done in BDS
(a TRv.... component)?

regards

Anders
Nevrona Support
2008-06-06 12:05:52 UTC
Permalink
Hi Anders,
Post by Anders Balslev
Since your own newsgroup are still down, I try to reach you here.
Yes, we are still down. But support is still available using ***@nevrona.com .

It is the night here and I am at a remote site, but the last I heard was that we do have a new server running with files loaded. Now they are working on getting the software (web / newsgroups / etc) loaded and running. Of course, there is some issue with "new server" not liking the web software etc.
Post by Anders Balslev
I have Rave Report BEX 7.0.5 BDE 2006
Thank you for using Rave Reports and providing your version number.
Post by Anders Balslev
.....
I would have "blue", "red" or "green" rather than "1", "2" or "3"
I believe that the easiest way to do this would be to use the OnGetText event, which you have done but for some reason do not want to use. I do not know if you tried using parameters in the OnGetText. That would give you some flexibility on the translation strings, all you would have to do would be initialize them before the report started. The reason you do not want to do an OnGetText event might help those who would like to help. Everyone remember, this is a "peer-to-peer" support area. So if anyone else has some ideas to help here, chime in. I am going to guess that your requirement either isn't a simple "1, 2 or 3" or it isn't fixed. "1" will not always be "blue".

The only other options that come to mind right now would be to use either a DataMirror or LookupDataView.

The LookupDataView, LookupField and LookupDisplay requires another table to "translate" the values to your strings. The RaveDemo in your Demo\Visual folder has a "CalculationReport" which uses the lookup method on the DataText12 component which you can study. Other than maintaining the "translation" table, this one can be expanded / changed as needed for "new" values.

The only other way that I can think of - would be to use mirroring. The same RaveDemo has a DataMirrorReport example on changing address lines based upon country code. I think this would become much more difficult to accomplish as the number of items to be "translated" increased.
--
Tech Support
***@nevrona.com

Loading...