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

Best way to change visuals in Query Designer/Wizard RB7.02 D6 EndUser

edited August 2003 in End User
Hi,

I need to do some visual changes to the Query Designer, Query Wizard
and the Dataview dialog. Specifically, for most users I want to
remove the SQL tab (an hence also the option in the dataview dialog)
and I want to rename and sometimes hide some of the columns in the
Table tab, Fields tab etc. I am not changing any behaviour (aside
from hiding some options/tabs/buttons).

What is the best (least intrusive) method to do this? I would like to
add some stand alone code that perhaps gets invoked on some specific
events to modify the forms once they have been created (setting
visibility and column headings there).

Is this possible or do I have to make a custom copy all of these
modules?

Thanks,
Rick Matthews
Dartek Systems Inc.

Comments

  • edited August 2003
    Use the Data Dictionary to reduce the tables and fields that are available
    to certain users. You can define multiple data dictionaries on a database
    and then filter the datasets that feed the TppDataDictionary component at
    runtime based on a "UserAccess" field in the Data Dictionary tables which
    you define.

    To hide tabs in the query designer, such as the SQL tab, then you can create
    a custom dataview class. Here is an example:

    http://www.digital-metaphors.com/tips/HideQDesignerTab.zip

    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited August 2003
    Thanks Jim,

    Your sample works great in hiding the SQL button on the dataview when
    the user is creating a new one via the File|New menu option. However
    it is not invoked for a saved report (report explorer) and it also
    doesn't hide the actual tab in the query designer.

    For the dataview itself, once created and saved the next time the
    buttons are back!

    So, any hints on overriding the buttons on a dataview when an existing
    dataview is instantiated, and for handling the query designer tabs?

    Thanks

  • edited August 2003
    OK sorry to be too quick off the mark. I see that older saved reports
    have references to TdaADOQueryDataView and new ones will have
    TmyADOQueryDataView. So I guess I need to convert the strings before
    instantiation.

    So, that only leaves the best method to optionally hide the SQL tab in
    the query designer and to optionally hide or rename some columns in
    the detail tabs.

    Thanks

  • edited August 2003
    If you have older reports, then you can change the class names in the
    template before you load it into a report. Here is an example of loading a
    binary template as ascii text so you can do this query dataview class name
    string conversion at runtime.
    http://www.digital-metaphors.com/tips/ConvertBinaryTemplateToASCII.zip


    Cheers,

    Jim Bennett
    Digital Metaphors
  • edited August 2003
    Thanks Jim that works great and I have use the language support tool
    to update the default language to the prompts and column headings I
    want.

    Now, how do I optionally at run time hide some of the columns in the
    top and bottom lists in the Query Designer?

    I already have had to make a local copy of the Query Designer for
    earlier items. So how do I best approach this?

    Thanks,

  • edited August 2003
    The top and bottom lists in the query designer are set in the different
    TdaDualListPage descendents in daQueryDesigner.pas. See the TdaFieldPage in
    particular where it overrides the CreateControls method. That is the top
    list view which creates the different columns for Field Alias, Field SQL
    Alias, etc...


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.