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

[Partially Solved]value based on the precision in list report

Started by mrcool, 07 Nov 2005 01:01:57 AM

Previous topic - Next topic

mrcool

Hi frnds,
Ã,  Ã, 
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  I want to get the output in a column based on the precison value in the other column.For example...

Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, For a given metric the value is 250 and the precision is 2 .i need output to display like 250.00.and if the precison is 3 means the output is 250.000.

Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, 

thanks,
S

Ã,  Ã,  Ã,  Ã,  Ã,  Ã, 

BIsrik

is the precision dynamic i mean is it enter by the user...

if so, check the round function..

Srik

mrcool

Hi...i want the precision dynamically from the DB....

BIsrik

just drag and drop the column and execute the report and check it..

Srik

mrcool

Ya i tried this alread...but it doesnt work...its just a column named precision in Db..so how it will work when we drag into the report...?How can i relate the precision value with the metric value so that i can get the decimal based on the precision value...



thanks,
S

kalyan_sekhar1

Hi,

Here is the scenario that mrcool is mentioning. You have acolumn in the List which is populating from a table let say a table which contains two columns

EMPSALARY | PRECISION

25000.00    | 2
352.256      | 3
352.0          | 1
352.4444    | 4
352             | 0


As u see from the abve table the EMPSALARY precision is based on the PRECISION column, so how do we achive this in the List report, how do we put conditional relation so that these two automatically tied up to display the data basing on the preicion

Thanks

BIsrik

its strange that the precision of the column itself is not fixed..rather the values in it are fixed..

try using this function..

round(empsalary, precision)

srik

kalyan_sekhar1

Thats nice,

Just now we tried this, only problem with this is let say if there is a numeric value like 389 and the precision for that is 2, but still i am getting the value as 389, but my intension is to get the value as 389.00

How do i do tht ?

Thanks

mrcool

Thnx kalyan what u said is correct....hi srik can u tell the sol for that.... ;)


Thanks,
S

mrcool

Hi srik any idea abt the problem...waiting 4 ur reply...

BIsrik

round function is useful when u have decimal values and u want to round them to some precision. But if there r no decimal values then it does nothing..Even if the round value number is more than the number of decimal digits it won't add any zeros after that...

For Eg: round(330.123,4) would output as 330.123 and not 330.1230. This is how round function works..

Now if u want the zeros to be added then i feel u have to some other functions than round...

Well anyway i too shall check the easiest way out for this...

Srik

mrcool