If you are unable to create a new account, please email support@bspsoftware.com

 

RESOLVED - Capitalizing 1st character - the solution in post from 2008 didn't work.

Started by FerdH4, 25 Jan 2024 02:29:21 PM

Previous topic - Next topic

FerdH4

Hi All v11.x Reporting Experts,

I'm trying to force the capitalization of the first letter in a text string.  A Cognoise post for v8.x from 2008 suggested "initcap() changes the first letter to caps."

The Expression pane's green Validate button doesn't issue any errors; but, unfortunately, that doesn't seem to work because it blows when I run the report - I get error, " 'initcap' is not a recognized built-in function name." 

Any suggestions for a replacement expression that is appropriate in v11.x?

MFGF

Quote from: FerdH4 on 25 Jan 2024 02:29:21 PMHi All v11.x Reporting Experts,

I'm trying to force the capitalization of the first letter in a text string.  A Cognoise post for v8.x from 2008 suggested "initcap() changes the first letter to caps."

The Expression pane's green Validate button doesn't issue any errors; but, unfortunately, that doesn't seem to work because it blows when I run the report - I get error, " 'initcap' is not a recognized built-in function name." 

Any suggestions for a replacement expression that is appropriate in v11.x?

Hi,

Is it just the very first character, or is it the first character of every word?

Initcap() is a database function (I think it's specific to Oracle), so if you're not reporting from a database that supports that function, it won't work.

If it's just the very first character, you could try something like

trim(UPPER(substring([Field],1,1)) + LOWER(substring([Field],2,99)))

or

UPPER(substring([Field],1,1)) + LOWER(substring([Field],2,char_length[Field] - 1))

Cheers!

MF.
Meep!

FerdH4

Quote from: MFGF on 25 Jan 2024 03:05:57 PMHi,

Is it just the very first character, or is it the first character of every word?

Initcap() is a database function (I think it's specific to Oracle), so if you're not reporting from a database that supports that function, it won't work.

If it's just the very first character, you could try something like

trim(UPPER(substring([Field],1,1)) + LOWER(substring([Field],2,99)))

or

UPPER(substring([Field],1,1)) + LOWER(substring([Field],2,char_length[Field] - 1))

Cheers!

MF.

Yes, just the first character of the first (and happens to be the only) word in the text.

I"ll give that a whirl MF.  Thanks twice today.

FerdH4

Quote from: MFGF on 25 Jan 2024 03:05:57 PMHi,

Is it just the very first character, or is it the first character of every word?

Initcap() is a database function (I think it's specific to Oracle), so if you're not reporting from a database that supports that function, it won't work.

If it's just the very first character, you could try something like

trim(UPPER(substring([Field],1,1)) + LOWER(substring([Field],2,99)))

or

UPPER(substring([Field],1,1)) + LOWER(substring([Field],2,char_length[Field] - 1))

Cheers!

MF.

The trim expression worked perfectly!

Thanks again.

FerdH4

I noticed another post's Subject had been updated with the word "Resolved" which seemed cool.  Thought I'd try to help make that trend by adding it to this post of mine since it actually is resolved.  :)


And, now of course I can't identify how to update the Subject line in an old post.  :(

MFGF

Quote from: FerdH4 on 01 Feb 2024 03:43:19 PMI noticed another post's Subject had been updated with the word "Resolved" which seemed cool.  Thought I'd try to help make that trend by adding it to this post of mine since it actually is resolved.  :)


And, now of course I can't identify how to update the Subject line in an old post.  :(

Hi,

If you go back to the first post you made in the thread, do you see buttons in the bottom right corner for "Quote", "Quick Edit" and "More"? If so, hover your mouse over "More", and you should see a submenu of options, one of which is "Modify"? This should allow you to change the subject of the thread.
Let me know if you don't see this option, and I can do it for you as a moderator.

Cheers!

MF.
Meep!

FerdH4

Quote from: MFGF on 02 Feb 2024 07:41:23 AMHi,

If you go back to the first post you made in the thread, do you see buttons in the bottom right corner for "Quote", "Quick Edit" and "More"? If so, hover your mouse over "More", and you should see a submenu of options, one of which is "Modify"? This should allow you to change the subject of the thread.
Let me know if you don't see this option, and I can do it for you as a moderator.

Cheers!

MF.

That worked!  I hope the Mods don't mind if I (or "we collectively") start doing that more routinely.  I think it helps the audience in several ways to know (a) what to focus on in order to help the open posts as well as (b) what to focus on in order to mine others' past successes. :)