Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

New AutoSearch Options suggestion

edited November 2007 in End User
Hi,

I have a large appliction that uses report explorer and I have a lot of
reports. I will explain what will be great to have :

Suppose table Clientes with a field ZoneID
Table MultipleItems with a field indexID , other field SubIndexID and other
Description

SubIndex have the corresponding code values for field ZoneID

I create a query for the report based on table Clients, but I need the
autosearch be based on another query that I will make on table MultipleItems
where I substract just a few records

The autosearch windows should show something like, 'Show records where
ZoneID is : ' ( ComboBoxHere )

the combobox will show the field Description, but will use the field
SubIndexID to set the where parameter back to the main query to be more
comprensive to the final user.

Another option will be that instead of a combox , the user will need more
than 1 value, so ComboBox can be replaced with a CheckBox List, and those
checked values 'ored' together in the where clause of the main query.

I read all the way this forum, I see many peoples asking for the same, the
answer is look at the demos and create a custom autoserch dialog, but I'm
not using just a report on a form.

I have a brief idea how I will like to be:
In the Search Tab of query designer , when drop a field in the criteria area
select as operator something like 'soDropDown' , in the value column show a
[...] button to configure this kind of search. open a small window where I
can entre the parameters : 'SourceOfOptions' , 'ListField', 'ParameterField'
all of these can be dropdown too.

sorry my english is not so good, but I hope you have understud, or I will
put my self on work and send you a more detailed graphic.

Be waiting your comments please, Regards

Comments

  • edited November 2007
    Hi Marcos,

    Thank you for the feedback. We will consider these enhancements for a later
    release of ReportBuilder.

    As a side note, and as you have found from reading other posts, it is
    possible to completely replace the AutoSearch Dialog and Query Designer to
    meet your needs.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2007

    - Have a look at the custom autosearch dialog demo
    (RBuilder\Demos\AutoSearch\Custom AutoSearch dialog. The architecture is
    very flexible and powerful. For each autosearch field, a separate AutoSearch
    Panel is created. Together the autosearch panels comprise the dialog. You
    can design custom panels and then build in rules about which panels get
    created for which fields. For example, you could have a panel correspond to
    an autosearch field datatype or a fieldname.

    adding support for autosearch lookups is high on our list of to do's for the
    next major release. Thanks again for the feedback.


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited November 2007
    Nico and Nard, thanks for fast replay

    Well, as far a I see the examples there are many things to do:

    {
    procedure TmyAutoSearchDialog.GetPanelClassForField(aField:
    TppAutoSearchField; var aPanelClass: TppAutoSearchPanelClass);
    begin
    {we'll be handling the Sale Date with our own custom panel, so return
    this class}
    if (aField.FieldName = 'SaleDate') and (aField.SearchOperator =
    soBetween) then
    aPanelClass := TmySaleDateSearchPanel;
    end; {function, GetPanelClassForField}

    }

    I think that TppAutoSearchField did not have FieldKind property, but I see
    in ppASFields that there are more property (not in help file)
    and one of them is DataType (string) be can be used.....

    I will like to show DatePickers controls for all those Date fields in
    AutoSearchCriteria. The Example will work only if the field name is know,
    I try my best to avoid fields hard code in generic code.

    Maybe I can find the field kind in the DataDictionary plFields tables, right
    ?

    Other thing is property SearchOperator: TppSearchOperatorType; must be
    extended, this is in ppTypes unit, this unit is huge
    what if I modify it and when you send a new release my unit is not
    functional anymore?

    TppSearchOperatorType may include this new kind of Search modes, lets say
    soLookUp and soLookupCheckBox

    soLookUp will show a dropdown, this can display a fieldlist, and will pass
    back to SearchExpression a sort of ValueField
    previusly configured in some new TppLookUpSearchCriteriaDlg (lot of work
    here) , BTW at this time I think TppAutoSearchField maybe is better to
    include a whole
    lookup class,
    DataSource : (kind?) where to get the list of values to fill the dropdown,
    normally this will be some daDataView (?)
    ListFields ; fields to display in the combobox for end user.
    ValueField : field used to get its value and build the SearchExpression


    With soLookupCheckBox, instead of use just 1 value for build the where, the
    end user can check 1, 2 or more options to get
    the desidered result.


    { TmySearchPanel.Init}
    In this procedure is where I'm able to made somthing with the controls I
    create in mySearchPanel, but without extend the TppAutoSearchField is not
    possible to write '' field names independent code'' ( you made it with the
    ppDataDictionaty.FieldFieldName, this is great, be able to config how the
    fields are called is very good ).

    so... write is quite simple, but looks to be a lot of job, I wish you my
    best :)

    I still read and learn source code of RB components

    Finally: I support RB all the way, try other products but no one reach what
    RB can do.

    Best Regards and I think I will wait for that new release


  • edited November 2007

    - you can select autosearch panels based on any TppAutoSearchField property.
    Most useful properties are FieldName and DataType.

    - to use a date picker for date fields, check the Field.DataType - it will
    be dtDateTime or dtDate.

    - SearchOperators correspond to valid SQL operators (=, >, <, etc). It is
    not intended that this be extended.

    - without extending TppAutoSearchField, all of the logic to do a lookup
    would need to be defined elsewhere. You could define a helper class or embed
    the logic in the custom autosearch panel class.



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.