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

dynamic/selectable display of decimals

Started by hespora, 25 Jul 2017 03:16:36 AM

Previous topic - Next topic

hespora

I'm creating a report on the price spread over time for selectable products. One thing I'd like to add as bells & whistles is to make the display of decimals either dynamic or user-selectable. I.e., when the price range for my product is in the hundreds, I don't really care if a value is 495.60 or 496.31, they can both be displayed as 496. But if the range is in single digits or even fractions, obviously I'm going to need to display decimals.

First thing I thought was to make a copy of my list, stick both copies into separate cards of a deck - one is formatted with decimals, one is not, and select the card via a toggle button. That technically works fine, but noticeably increases the run time of the report - apparently, the second list also fires the query against the database, even though I've set the query hint "use local cache" to yes. So I'm somewhat reluctant to use this approach.

Does anyone have any other idea on how to make decimal display selectable?

MFGF

Quote from: hespora on 25 Jul 2017 03:16:36 AM
I'm creating a report on the price spread over time for selectable products. One thing I'd like to add as bells & whistles is to make the display of decimals either dynamic or user-selectable. I.e., when the price range for my product is in the hundreds, I don't really care if a value is 495.60 or 496.31, they can both be displayed as 496. But if the range is in single digits or even fractions, obviously I'm going to need to display decimals.

First thing I thought was to make a copy of my list, stick both copies into separate cards of a deck - one is formatted with decimals, one is not, and select the card via a toggle button. That technically works fine, but noticeably increases the run time of the report - apparently, the second list also fires the query against the database, even though I've set the query hint "use local cache" to yes. So I'm somewhat reluctant to use this approach.

Does anyone have any other idea on how to make decimal display selectable?

Hi,

A much more efficient approach would be to add the same item to your list as two separate columns, each formatted differently (one with decimals and the other not). You can then select each column and in properties, use the Column Visibility property to hide or show the column based on the value in an active report variable (set by buttons or a dropdown). This way you only have one list retrieving the value once and displaying it in different formats.

Cheers!

MF.
Meep!

hespora

Oh wow - i did not realize that active report variables could interact with layout properties. Thank you very much! :)