Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C8 - ReportStudio - convert type-in parameters to uppercase

Status
Not open for further replies.

Vivarto

Programmer
Nov 27, 2005
43
0
0
AU
At the risk of sounding like a right muppet...

This has got to be simple but I can't find a solution. I have a type-in prompt (can't use a value prompt for a number of reasons). The user can enter mixed or lower case but we want to display the typed in value in the report header (in a text item) in upper case, e.g. user types in Xyz001234 we need to show XYZ001234.

I display the prompt value using:

ParamDisplayValue('Policy Number')

I have tried upper(ParamDisplayValue('Policy Number')) but this just errors - (well no surprises there Sherlock...)

There doesn't appear to be a Report Function I could use.

I could go off to the database and use SQL to perform the case conversion:

select distinct policy_nbr
from policy
where policy_nbr = upper($Policy Number$)

i.e. a filter of [Claim Reporting].[Policy].[Policy Number] = upper(?Policy Number?)

and then display the results in a single column list but this goes against our development standards :-(

I have looked at the properties of a type-in prompt and I can't see anything there that would automatically convert the entered text to uppercase.

So, have I missed something simple or is this just one of those Cognos things?

Cheers
 
Hi,

You cannot use the Upper function in a layout calculation, but you can use it in a query calculation. Try the following approach:

From the toolbox, drag a repeater to your page header. Change the Query property of the repeater to use the same query as your report.

From the Toolbox, drag a query calculation inside the repeater, and give it a name. For the expression, use upper(?parameter?) [where ?parameter? is the parameter your prompt is setting]

Best regards,

MF.
 
Hi MF,

Thanks for taking the time to respond to this however I can't use your suggested solution as we have pretty rigid development standards, with templates, that basically force us to use a report expression for displaying prompt values. I have been pushing for a bit of flexibility on this muddle-headedness and I now have yet another piece of ammunition.

As I mentioned in my original post I had already considered using a SQL statement however I had not considered using a Repeater for this as I have not had much reason to look at 'repeating things'. It is a neat way of displaying a singleton select by removing the need to suppress list headers and borders. While I can't use your suggestion I have learnt something useful.

Cheers, Tom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top