Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #31301

    Hi there,

    I’ve upgraded to the latest version of COv4 and an exciting thing has started happening.

    The following statement in the ‘Report Source’ for a report used to work prior to the application of the latest version:

    LTRIM ( RTRIM ( per.firstname ) + ‘ ‘ + RTRIM ( per.lastname ) ) AS _payername

    Now it crashes.

    I’ve removed the LTRIM and associated parantheses and it works fine.

    I appreciate that it’s not the end of the world (although I have to search through all the reports to find this type of statement) but have you any insight you could offer?

    The build is 1068, the database is 1.067 and it’s .NET 4 Full Version.

    Thanks,
    Adminboy.

    #33003
    Support
    Keymaster

    Hi Adminboy,

    Thanks for your post. To be honest I’m not sure about the LTRIM and RTRIM SQL commands. Please try substituting that enter line for the following :-

    @NAME:per as _payername

    The ‘@NAME’ function is a ClinicOffice extension which calculates the full name based on the name format in your program settings.

    Please let us know if this works for you.

    #33004

    Support,

    Thanks for your reply.

    I used to use the @name extension but I stopped using it (I think it was because where the records had no first name, @name produced a string that started with a space and thus messed up the sorts, therefore I use the LTRIM to remove the leading spaces from the concatenated string).

    It was the same reason I stopped using @address.

    I’m guessing it is down to my ignorance in how you’ve set up the extensions. Could you let me know how they work?

    I’m sure you already have your own reference so just for information I use: http://www.elevatesoft.com/manual?action=contents&id=edb2sql

    The LTRIM page is http://www.elevatesoft.com/manual?action=viewtopic&id=edb2sql&topic=LTRIM

    Thanks,
    Adminboy.

    #33005
    Support
    Keymaster

    It’s not quite as simple as just looking up the EDB reference guide I’m afraid. ClinicOffice uses an intermediate SQL language as it has to be compatible with both EDB SQL and PGSQL, so certain functions may not be supported.

    There shouldn’t be any leading or trailing spaces using @NAME, but you could try the following :-

    TRIM(@NAME:per) as _payername
    #33006

    I’ll try that. Thanks.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.