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

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Using active report variable value in a dataItem

Started by Arhinoa, 28 Aug 2014 07:16:29 AM

Previous topic - Next topic

Arhinoa

Hi!

We're having an issue with the value of an active report variable.
Actually, the value contains an "_" and this character is not to be displayed to the end users.

We'd like to know if there is a solution to pass the value of the variable in a data item so that we can treat the underscore and display a value without it.
In fact, if someone has an idea about how to display the value without an underscore, I'm more than interested.

I'm not sure I'm clear, don't hesitate to ask questions.


Regards,
Arhinoa.


bdbits

I think macros work in Active Reports, so you could use something like this.

#sq ( substitute ( '_',' ','remove_underscores') )#

The first string is what you want to search for, in this case an underscore.
The second string is what you want to replace it with, in this case a space.
The third string is the expression to modify. I used a string but it can be a column with a string value.

Arhinoa

Thanks for your response bdbits.
You are right. Macros also work with AR.
The thing is that we don't know how to catch the current value of the active report variable (the 3rd parameter in your macro).
We can display it in a variable text item but we hadn't found a way to modify it in order to delete the underscore.

MFGF

Quote from: Arhinoa on 28 Aug 2014 09:54:04 AM
Thanks for your response bdbits.
You are right. Macros also work with AR.
The thing is that we don't know how to catch the current value of the active report variable (the 3rd parameter in your macro).
We can display it in a variable text item but we hadn't found a way to modify it in order to delete the underscore.

Hi,

The values you find in a variable are populated in one of only two ways:

1. They are manually defined
2. They are defined by the values in a data item

If the variable values are manually defined, all you need to do is to change the definition of the variable in question so it doesn't contain an underscore
If the variable values are populated by a data item, you can replace this data item with a query calculation that strips out the underscore from the values in the data item.

Cheers!

MF.
Meep!

Arhinoa

Hi!
Sorry for not responding.
We found a workaround!
We had a confirmation from IBM that it was impossible to modify the value of an active report the way we wanted.

So we created another crosstab just for displaying without the underscore. We inserted only one data into that crosstab: the data item source of our AR variable, filtered by the actual value of the variable. 
Then, we added a report expression to the crosstab, where we deleted the underscore.

Thanks for your help!