Locating a Parameter AutoSearchField in RAP using AutoSearchCriteriaByName
Hi,
I use a custom AutoSearchDialog, and I make extensive use of the
AutoSearchCriteriaByName function in RAP code. I've been playing
around with the new AutoSearch Parameter, after upgrading to RB12.
However, I've noticed that the autosearch fields created by parameters,
do not have the FieldName assigned, so they can't be found using the
AutoSearchCriteriaByName function. Am I supposed to use another way to
find autosearch fields of parameters in RAP?
Also, in the Report Designer, when editing the AutoSearchSettings of
the parameter, you can check "Mandatory" and "Show all values"
simultaneously, which is not supposed to happen, . Thought I'd let
you know. These settings already have this restriction in the Query
Designer.
Thanks!
--
Arturo
Using RB12.04 Build 77
I use a custom AutoSearchDialog, and I make extensive use of the
AutoSearchCriteriaByName function in RAP code. I've been playing
around with the new AutoSearch Parameter, after upgrading to RB12.
However, I've noticed that the autosearch fields created by parameters,
do not have the FieldName assigned, so they can't be found using the
AutoSearchCriteriaByName function. Am I supposed to use another way to
find autosearch fields of parameters in RAP?
Also, in the Report Designer, when editing the AutoSearchSettings of
the parameter, you can check "Mandatory" and "Show all values"
simultaneously, which is not supposed to happen, . Thought I'd let
you know. These settings already have this restriction in the Query
Designer.
Thanks!
--
Arturo
Using RB12.04 Build 77
This discussion has been closed.
Comments
Thanks for pointing that out, will put that on the list to be improved.
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Ok, but how do I get access to the AutoSearchField associated to the
parameter? It is a private field of the parameter right now, and the
AutoSearchCriteriaByName cannot locate it because when it was created,
no FieldName was assigned to it.
In our reports, we create custom autosearch panels in a custom
autosearch dialog, all from RAP. So, we call a function like:
myDialog.CreateCustomAutoSearchPanel(aAutoSearchField:
TAutoSearchField, ...);
We use a lot of other settings to configure the custom panel, and
that's why we create it in RAP and it is not code inside the custom
autosearchdialog form.
But we need to associate the panel to the autosearch field we want to
modify in the custom panel. That's why we use a lot of
AutoSearchCriteriaByName or AutoSearchFields[ix]. And in the case of
AutoSearchFields automatically created by parameters, there is no way
of getting access to them right now, or I haven't found out how.
I modified the AutoSearchCriteriaByName to test for both FieldName and
FieldAlias, and in the reports I was playing around with, I was able to
get access to the AutoSearch fields created by parameters. However,
this is just a temporary workaround before I figure out what's the
proper way of doing it, .
Thanks in advance!
--
Arturo
Using RB12.04 Build 77
I made the same mods here so that AutoSearchCriteriaByName or
AutoSearchFieldByName will check for the FieldAlias or FieldName. That will
be included going forward.
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com