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

Getting Report Name in GetPanelClassForField

edited August 2003 in End User
I'm implementing TppAutoSearchDialog.GetPanelClassForField and need the name
of the report from the Data Dictionary...anyone know how I can get that from
either TppAutoSearchField or the TppAutoSearchDialog object itself.

Comments

  • edited August 2003
    What I would do in this case is create a new registry (singleton) so you
    could reference this in different parts of the app so it can stay decoupled.
    Basically, you want to asscociate a report, or group of reports with a
    specified autosearch panel class. Create a singleton registry that you can
    call from here and your main form where the dictionary datasets are. I'll
    contrive an example, so let's assume each folder in the report explorer
    should have a custom autosearch dialog. When a report gets loaded, created
    or saved, you could crossreference the folder id table and the item table
    item id to figure out the folder name. Then using the folder name, associate
    that with the custom autosearch dialog. When the user creates a new folder
    you don't register a replacement autosearch dialog, or you could ask them to
    register one I guess. As the developer, you can specify the predetermined
    folder names and give them cool custom autosearch dialogs. You will code in
    the initialization section of the app the register calls to associate a
    folder name with an autosearch panel class you have designed.

    Another way to do it is to reference the current template name from the
    rbItem dataset in the unit where you have defined the data access
    components. Make it a property of that form class and then reference it in
    your custom autosearch dialog unit. If you have circular unit refernce
    problems, then create a class in a unit in between the custom autosearch
    panel unit and the main data access unit. Then you can pass through the
    property to your autosearch dialog using this new class.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.