Changing the SearchExpression for a Parameter
Hi,
When I change the SearchExpression of a Parameter, either from code or in
the designer, the Value does not automatically get updated. However, when I
change the Value, the SearchExpression gets updated to refelect he new Value
entered. Is this the correct behaviour. I swear it use to work different
in a previously version of RB 11 but I certainly could be wrong. Just
curious what the correct behaviour should be and if it is indeed the correct
behaviour then I'll change how I update the SearchExpression from code.
Thanks,
Scott
When I change the SearchExpression of a Parameter, either from code or in
the designer, the Value does not automatically get updated. However, when I
change the Value, the SearchExpression gets updated to refelect he new Value
entered. Is this the correct behaviour. I swear it use to work different
in a previously version of RB 11 but I certainly could be wrong. Just
curious what the correct behaviour should be and if it is indeed the correct
behaviour then I'll change how I update the SearchExpression from code.
Thanks,
Scott
This discussion has been closed.
Comments
Having given it some further thought I can see why this behaviour is
probably the correct behaviour. The value in the SearchExpression (which
is always a string) might not be able to be truly reprsented in the Value.
For example, if the parameter type is Date and you are doing an InList
search, you SearchExpression of '1/1/2009, 1/31/2009' could not truly
represented in teh Value as it can only hold a single date value.
So, in my cause when I want to use the Value in the report and the
SearchExpression is a single date value then I should assign it the Value
instead of the SearchExpression.
Again, please confirm that this is the correct behaviour.
Thanks,
Scott
There is now an RB 11.06 patch available for this issue.
Modifying Parameter.AutoSearchSettings.SearchExpression /should/ update
Parameter.Value. When a multi-value search operator is used such as soInList
or soNotBetween then Parameter.Value then use Parameter.ValueCount and
Parameters.Values[ ] to access the values. For the mult-value case,
Parameter.Value will return Parameter.Values[0[.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com