LTRIM and Report Source

Help with reports & document templates
Post a reply

LTRIM and Report Source

Postby adminboy » March 8th, 2012, 6:57 pm

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.
adminboy
 
Posts: 15
Joined: February 13th, 2011, 12:19 pm
Top

Re: LTRIM and Report Source

Postby Support » March 9th, 2012, 12:08 pm

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 :-

Code: Select all
@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.
ClinicOffice Support Team
User avatar
Support
Site Admin
 
Posts: 874
Joined: August 25th, 2005, 6:37 pm
Top

Re: LTRIM and Report Source

Postby adminboy » March 11th, 2012, 11:14 am

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?actio ... id=edb2sql

The LTRIM page is http://www.elevatesoft.com/manual?actio ... opic=LTRIM

Thanks,
Adminboy.
adminboy
 
Posts: 15
Joined: February 13th, 2011, 12:19 pm
Top

Re: LTRIM and Report Source

Postby Support » March 13th, 2012, 3:28 pm

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 :-
Code: Select all
TRIM(@NAME:per) as _payername
ClinicOffice Support Team
User avatar
Support
Site Admin
 
Posts: 874
Joined: August 25th, 2005, 6:37 pm
Top

Re: LTRIM and Report Source

Postby adminboy » March 16th, 2012, 1:50 pm

I'll try that. Thanks.
adminboy
 
Posts: 15
Joined: February 13th, 2011, 12:19 pm
Top


Post a reply

Return to Reports & Templates

Who is online

Users browsing this forum: No registered users and 2 guests