Subject | GetText and Master/Param Linked |
---|---|
Author | dmarmur2002 |
Post date | 2004-06-17T08:36:27Z |
First an apology if this is double posted.
Is one of the ideas of the IB_GetText event to translate values from
a master to a detail? I don't think it should be.
... in detail ...
I thought that the functionality in IBO would use the AsRawString to
populate masterlinked datasets with parameter info upon a
MasterDataChange event. I find that Param.Assign(
MasterData.SourceField ) is used and the TIB_Row Assign function
uses AsString. So whereever I have a IB_GetText function the master
linked dataset will get the wrong value and thus no records (or the
wrong ones) will show up.
Solutions would be;
* To change IBO TIB_Dataset.SysMasterDataChange and similar
functions so that they use AsRawString (what is the use of going
through IB_GetText on this level?)
* To write an IB_SetText for the linked datasets that translates
back, though it would be tricky to find the correct parameter name
for MasterLinked datasets (GetMasterLinkParamName is protected) and
insert that upon OnPrepare of the master (it's prepared before the
details).
* To use different fields for the display and the linking though
that would mean a wider buffer and more data over the line.
If I want to go for the first one and patch IBO is
TIB_Dataset.SysMasterDataChange the only place I would need to look?
Regards,
/Dany
Is one of the ideas of the IB_GetText event to translate values from
a master to a detail? I don't think it should be.
... in detail ...
I thought that the functionality in IBO would use the AsRawString to
populate masterlinked datasets with parameter info upon a
MasterDataChange event. I find that Param.Assign(
MasterData.SourceField ) is used and the TIB_Row Assign function
uses AsString. So whereever I have a IB_GetText function the master
linked dataset will get the wrong value and thus no records (or the
wrong ones) will show up.
Solutions would be;
* To change IBO TIB_Dataset.SysMasterDataChange and similar
functions so that they use AsRawString (what is the use of going
through IB_GetText on this level?)
* To write an IB_SetText for the linked datasets that translates
back, though it would be tricky to find the correct parameter name
for MasterLinked datasets (GetMasterLinkParamName is protected) and
insert that upon OnPrepare of the master (it's prepared before the
details).
* To use different fields for the display and the linking though
that would mean a wider buffer and more data over the line.
If I want to go for the first one and patch IBO is
TIB_Dataset.SysMasterDataChange the only place I would need to look?
Regards,
/Dany