Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Assign computed column to a report parameter
vash
Hi,
I have a dataset with one computed column.
I want to assign the value of this computed column to a report parameter.
I did the following in "onFetch" method of the dataset:
params["RP_histPoints"].value = row["hisPoint"];
But the report parameter value is empty.
Am I doing something wrong?
Thanks,
Vash
Find more posts tagged with
Comments
mwilliams
Hi Vash,
Without testing it, I'm not sure if this is the issue, but do you have anything in your report design bound to this dataSet? If not, the dataSet will never execute and the fetch method will never be called, therefore, the parameter won't be set.
vash
Hi Michael,
My dataset is bound to a chart.
The sample data in my dataset looks like:
ColA ColB CompCol1
1 8 3
2 7 3
3 11 3
4 23 3
5 14 3
Computed column is a count of values in columnB greater than 10.
Do you think I can assign CompCol1 to a report parameter?
Thanks,
Vash
vash
Hey Michael,
I have attached a sample xml data file and a report design.
I want to assign the value of computed column "count" to the report parameter "RP_count".
Please suggest a solution.
Thanks,
Vash
mwilliams
Vash,
It doesn't look like you'll be able to assign the value in the dataSet script. Most likely, it's because of the order in which things are created and when the script assigning the parameter value runs. If you assign the value in the onCreate script of a data element in your report that is bound to your dataSet, it'll work as expected.
vash
Michael,
I am using the dataset for a chart.
Can you make the changes in my existing report, to show the solution.
Thanks,
Vash
mwilliams
Vash,
Check out the changes to your report design you posted. I added a data element with the value of the column in it. Assigned the parameter value with this value in the onCreate method and made the element not visible. The grid and element that you set up, now show the value of the parameter you were wanting and is the only information in the report.
vash
Hey Michael,
It works perfectly.
Thank you so much.
-Vash
mwilliams
Glad to help.