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

Autosearch "non data-aware" ?

edited January 2006 in End User
Hi,

I have an end-user application (D7, RB903) with custom autosearch dialog.
Now a new need arises.
Some reports need a parameter like a radiogroup (or groupbox), i.e. I
need to present the user something to choose between a fixed set of choices.
These choices are not "data-aware", they have no database representation.
Which is the best way to achieve this ?

Thanks in advance
Bye
Nicola

PS
In a similar case in the past I stored the choices in a database table
and built a autosearch field on this.
But this is certainly not a good solution.

PPS
What about adding the capability of defining an autosearch field non
data-aware (like a macro) and then specify somewhere in the report
designer the possible choices ?

Comments

  • edited January 2006
    Hi Nicola,

    Take a look at the parameters feature in RB. See the TppReport.Parameters
    topic in the RB help for more information. You could perhaps set a report
    parameter using your custom autosearch dialog, then retrieve and use them
    inside the report as needed (in RAP).

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2006
    Hello Nico

    It seems that TppReport.Parameters can only be written by code
    or is there any way to define them from the report designer?

    For me the process should be;

    1. the user which writes the report also defines the report parameters
    in the designer and then he/she writes the rap code to handle it

    2. at printing time my custom as dialog display the proper ui control


    Nico Cizik (Digital Metaphors) ha scritto:
  • edited January 2006
    Nicola,

    One approach is to create a dataview in DADE that is just there to allow
    you to create autosearch fields (i.e., never attached to a report object).
    Add a table from your database that has the appropriate field types so that
    the end user is forced to enter a valid value.

    Put all autosearch criteria in this dataview and in the
    ReportOnGetAutoSearchValues event, assign any that apply to other dataviews
    using CreateAutoSearchField. If you do not do this, the user has several
    tabs on the search dialog.

    For the non-data aware criteria, you can now use them as you please (e.g.,
    conditionally suppress objects).

    --

    Bob

  • edited January 2006
    Bob,

    Thanks for your suggestion.
    I already tried a similar approach, but I had to add a real table or
    field in our database, and I don't liked it very much.
    So I was looking for a kind of "not-dataview" approach, something like
    macros in other reporting software

    Bob ha scritto:
  • edited January 2006
    Hi Nicola,

    Correct, the report parameters would need to be created in code (RAP or
    Delphi). One other option might be to create your own "Parameters dialog"
    that is instantiated by an added menu option in the designer.
    TppDesigner.Menu gives you full access to the designer's TMainMenu object.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2006
    Hi Nico,

    Thanks, this sounds better!
    Bye
    Nicola

    Nico Cizik (Digital Metaphors) ha scritto:
This discussion has been closed.