Problem with autosearch fields and multiple data pipelines...
Hi,
I have a report that has 4 different queries (or data pipelines). All of
these queries have an AutoSearchField named "ADate". However, when I use
AutoSearchCriteriaByName (i.e. AutoSearchCriteriaByName('Query1', 'ADate),
AutoSearchCriteriaByName('Query2', 'ADate), etc.) I always get the
AutoSearchField of the first data pipeline and the other autosearch fields
are never found. I found out the reason was that the autosearch fields were
never assigned a DataPipelineName.
I made the following modifications for this to work:
function TppReport.AutoSearchCriteriaByName(..): TppAutoSearchField;
(...)
begin
(...)
lAutoSearchField := AutoSearchFields[liIndex];
// if (CompareText(aDataPipelineName,
lAutoSearchField.DataPipelineName) = 0) or
// (CompareText(aFieldName, lAutoSearchField.FieldName) = 0) then
if (CompareText(aDataPipelineName, lAutoSearchField.DataPipelineName)
= 0) AND { Modified }
(CompareText(aFieldName, lAutoSearchField.FieldName) = 0) then
(...)
end; {procedure, AutoSearchCriteriaByName}
procedure TdaQueryDataView.CreateAutoSearchFields(...);
(...)
begin
(...)
if (lCriteria.IsExpression) then
lField.FieldAlias := lCriteria.Expression
else
lField.FieldAlias := lCriteria.Field.Alias;
lField.DataPipelineName := Self.Datapipelines[0].UserName;
Added }
lField.FieldName := lCriteria.Field.FieldName;
(...)
end; {procedure, CreateAutoSearchFields}
Any feedback on correctly implementing these changes would be greatly
appreciated.
--
Best regards,
Arturo Monge
BitSoft Development
http://www.bitsoft.com
I have a report that has 4 different queries (or data pipelines). All of
these queries have an AutoSearchField named "ADate". However, when I use
AutoSearchCriteriaByName (i.e. AutoSearchCriteriaByName('Query1', 'ADate),
AutoSearchCriteriaByName('Query2', 'ADate), etc.) I always get the
AutoSearchField of the first data pipeline and the other autosearch fields
are never found. I found out the reason was that the autosearch fields were
never assigned a DataPipelineName.
I made the following modifications for this to work:
function TppReport.AutoSearchCriteriaByName(..): TppAutoSearchField;
(...)
begin
(...)
lAutoSearchField := AutoSearchFields[liIndex];
// if (CompareText(aDataPipelineName,
lAutoSearchField.DataPipelineName) = 0) or
// (CompareText(aFieldName, lAutoSearchField.FieldName) = 0) then
if (CompareText(aDataPipelineName, lAutoSearchField.DataPipelineName)
= 0) AND { Modified }
(CompareText(aFieldName, lAutoSearchField.FieldName) = 0) then
(...)
end; {procedure, AutoSearchCriteriaByName}
procedure TdaQueryDataView.CreateAutoSearchFields(...);
(...)
begin
(...)
if (lCriteria.IsExpression) then
lField.FieldAlias := lCriteria.Expression
else
lField.FieldAlias := lCriteria.Field.Alias;
lField.DataPipelineName := Self.Datapipelines[0].UserName;
Added }
lField.FieldName := lCriteria.Field.FieldName;
(...)
end; {procedure, CreateAutoSearchFields}
Any feedback on correctly implementing these changes would be greatly
appreciated.
--
Best regards,
Arturo Monge
BitSoft Development
http://www.bitsoft.com
This discussion has been closed.
Comments
I just found another thread with the answer to this question. Thanks!
"Arturo Monge" escribi? en el mensaje
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com