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

Expressions

edited July 2003 in End User
Just to make sure I am not reinventing the wheel...

I would like to have users build expressions on the calc page using the
field aliases. Our end user app is not going to show them any underlying
table or field names. Expressions would come out looking something like:

[Quantity] * [Final Price]

then be translated before being given back to the engine to the acutal sql
field names:

qty * finalprice

For this I plan to build another dialog to make it really simple. Is there
already something like this dialog? Obviously there are underlying
functions to translate a field name to its alias and such, but how about
anything related to expressions?


Jim

Comments

  • edited July 2003
    There isn't any code for expressions, as the expressions you type in are
    passed through directly into the SQL of the query. The expressions aren't
    parsed at all. You'll have to create a custom query tool to let them build
    an expression. You'll have to write the expression parser as well. You can
    unregister the query wizard and query designer and then register your new
    custom query tool. Here is an example that replaces the query designer for
    example:

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


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited July 2003
    Yeah, I've already replaced the query designer. Next is the query wizard.
    Ok, just wanted to make sure I wasn't wasting time.

    Thanks,
    Jim


This discussion has been closed.