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

creating a field in the end-user data designer

edited June 2003 in End User
Dear all,
I have RB pro and am creating user reports. I want to have a
calculated field which is a persons full name. I can see how to create a new
field name in the query designer, but when I set the expression for the
field to
person.fname || ' ' || person.lname
I do not get anything.
What is the correct method for introducing a field which is a concatenation
of existing fields and spaces in the end user tool?

thanks
--
John Evans
Managing Director
Clear Advantage Ltd

www.Clear-Advantage.co.uk

Comments

  • edited June 2003
    What do you see when you preview the data on the dataview? What database are
    you using? That should work, if || is string concatenation for yoru
    database. For example, if you were using a BDE Paradox database, such as
    DBDemos, you can say this for the expression: FirstName + ' ' + LastName.
    Try taking off the table name prefix. Maybe you need double quotes for your
    database for a simple string?


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited June 2003
    Dear Jim,
    thanks, FirstName + ' ' + LastName worked once I had re-set the
    fieldname.

    Now I have a similar problem. I want the difference between two dates in
    number of days.

    The expression I have got is
    dateclosed-dateopen as dateclosed_dateopen
    This returns a date.
    How do I alter it to use the day interval function
    I have tried (dateclosed-dateopen) day as dateclosed_dateopen
    ( (dateclosed-dateopen) day as dateclosed_dateopen)
    (dateclosed-dateopen as dateclosed_dateopen) day

    none of them are accepted

    regards


  • edited June 2003
    The expression calc is not validated by RB, but rather the resulting SQL
    with the expression calc SQL is submitted to the database server for
    verification. Try coding it in a query on a form to see if the SQL is valid
    for your database.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.