Hi friends,
here is the issue,
Ã, Ã, Ã, Ã, Ã, Ã, In my report i need to display thousand seperator according some conditon.
Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, for example : if active_flag ='Y' then value should display with thousand seperator else it should not display the thousand seperator.
Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, value =25000
Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, if yes it should display the value as in the report 25,000
Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, if no it should didplay the value as in the report 25000
i tried with conditional style option but it doesn't worked for me.
can anybody suggest me how to solve this problem
thanks
aamuktha
it could be done by the conditional style itself..have u checked on the data format part...
Srik
Srik,
The data format property is not available for conditional style.
ok, i was not clear with my saying..
I meant this way..drag the measure column twice to the report. For one column apply the data format setting saying display thousand separator and for another set it to no. Then in conditional formating depending on the condition set the column box type to none.
Srik
hi
thanks for ur reply
but that is not my issue
i have a list report in that few rows are related to active_flag='y' and few rows are related to active _flag='n' .In this case the solution given by u doesn't work.
format of the report:
name active_flag value1 value2
aaaa y 2,000 3,000
bbbb n 2000 3000
this is the way i need to show the output in the report
aamuktha
u can have the same solution for this...
I went with this approach, first selected name, active_flag and value1 and value2 into the list. Then inserted value 1 and value2 again in the list. Then i set the data format property for the one set of value1 and value2. Then created a variable saying active_flag = 'Y'. then depending on the condition i set the box type propery to none..
I don't have the standard cognos package with me or else could have given u a xml spec.
Srik
That should definately work. Good solution, Srik.
You can conditional format the "data format" if you unlock objects. This is a bit of a pain in the a.. but it works. You unlock your page, then you can select the data item itself and make your conditional formatting. No need to complexify more than that, no need for two columns, etc.
Cheers
Hi,
We have assumed a 9 digit number (123456789) and formatted it as a comma separated value.
Below is the calculation which we used.
We have tested it on DB2 database. You might have to change some of the functions if u r using any other database.
Let us know if this was of any help to you.
Calculation:
trim(LEADING, ',', cast(
(substring((trim(char(repeat(',',(9-length('123456789'))))) + '123456789'), 1, 3) + ',' +
substring((trim(char(repeat(',',(9-length('123456789'))))) + '123456789'), 4, 3) + ',' +
substring((trim(char(repeat(',',(9-length('123456789'))))) + '123456789'), 7, 3)),
CHAR(11)) )
Regards,
Sri
gr8 Boris, A very simple solution indeed.
Sridhar, How would that calculation help in conditional formatting..
Srik
I just gave a way of inserting commas with the help of a calculation.
This calculation should be done when the flag is Y, else just convert the number to String and leave it. that way, it would work.
But, solution given by Boris is simple and efficient. I made it unnecessarily complex, not knowing about unlocking and then applying conditional formatting.
Regards,
Sri
fine...
aamuktha, could u plz update us the status of the topic...
Srik
aamuktha,
Please close this thread if your issue is solved. See the board rules.