We can use the same concept of hidden columns as complex formul for columns
Some times, in a report, we may create a big formula like
((column a + column b )/column c * 100 ) column d
Assume that the same formula is referenced in another column as
((column a + column b )/column c * 100 ) column d + column E
in such case, the formula from the first column can be copied and used again the the second column.
If the same formula is referenced in many columns then also the it can be copied and pasted in all the required places.
Now the problem is what if, the formula in the first column is changed? The report needs to be opened and all the columns should be changed. If the formula is reused in many reports then also we need to do the same thing.
This process can be avoided by using presentation variable and hidden prompts.
Let’s create a report in Paint subject area.
Columns are
- Year Units Price per unit Dollars
Derived columns
Column 1: (Price pre unit * units * 100 ) /100 ---Some dummy formula
Column 2: (Price pre unit * units * 100 ) / 100 * Units --- Another dummy formula
The report will look like this
Now, lets replace the first formula with a presenation variable called “@{pres_dollars_col_1}”
and the second column as
Save the report.
If the report is executed then the output will be
Now lets create a prompt
1. Change the formula to “1” (any unique no which is not used as a column name in any prompt or report)
2. Change the control type to “Edit Box”
3. Defaluts to : Specific Value and the value will be the fromual that we want to reuse.
4. Set Variable : Name of the presentation variable which was used in the report.
Save the prompt.
Place the report and the prompt in a dashboard page
We got the desired output.
Now in the dashboard, we can hide prompt as follows:
Place the prompt in a new section.
Section Properties -> Format Section -> Check the “Use Custom CSS Style” check box and in the text box add the code “Display:None”
Click on ok and return to the Dashboard page
Hope this helps...
Comments
Post a Comment