Report with RAP won't compile after a fieldname alias has been changed
Hi,
I use translated field and table aliases in RB version 10.9. With exception
to RAP this all works fine. But in RAP the Data dialog shows the aliases,
and it seems that the aliases - and not the original table and field names
are saved with the report. After the alias (translation) has changed, RB
shows that the variable can't be compiled. As a result of this, "old"
reports with variables that are derived from data fields in RAP, are
unusable after the alias (translation) of the corresponding table or fields
have been changed.
My question is:
Is there any way to force RB to use the original data fields (instead of the
aliases) in RAP?
We are not using Dade.
Thanks in advance,
Ruud Schneiders
I use translated field and table aliases in RB version 10.9. With exception
to RAP this all works fine. But in RAP the Data dialog shows the aliases,
and it seems that the aliases - and not the original table and field names
are saved with the report. After the alias (translation) has changed, RB
shows that the variable can't be compiled. As a result of this, "old"
reports with variables that are derived from data fields in RAP, are
unusable after the alias (translation) of the corresponding table or fields
have been changed.
My question is:
Is there any way to force RB to use the original data fields (instead of the
aliases) in RAP?
We are not using Dade.
Thanks in advance,
Ruud Schneiders
This discussion has been closed.
Comments
Data-aware controls such as DBText are bound using the DataField property -
which is a field name. To be more user friendly, the Designer displays the
FieldAliases in the format toolbar.
When writing code, the DataPipeline['FieldAlias'] notation is designed to
allow RAP or Delphi code to be more user friendly.
You can use DataPipeline.GetFieldValue('FieldName') to retrieve a field
value using the field name.
You can also use DataPipeline.Fields[Index] to access the fields by index.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
fieldnames? The same what is already happening with the groups. There the
user sees field aliases too, but stored are the fieldnames, which makes the
groups not dependable on changes of the aliases in any way.
The best example is a multilingual report, i.e. a report in a miltuligual
application. Exactly what Ruud did describe. While it looks more user
friendly with the aliases, the usage of them in RAP is not that user
friendly, if a report, which works with language A doesn't work anymore with
the language B because of the aliases only.
No chance to store the fieldnames and to rebuild the RAP code accordingly,
once the designer or the calc-tab is showed? Parse the stored code, replace
the fieldnames with the aliases and show it. When savong the report: the
same backwards.
Regards,
Mark
any chance for a change of that functionality?
Mark
Currently the RAP source is stored as plain text, there is no parsing, no
concept of objects. Therefore such a change would be a big departure from
the current implementation.
I will put this on the list of requested features.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
thank you for your reply, Nard.