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)
Report Parameter operation
prashu_444
hi,
I have a report parameter value as 2008.I want to display it as 2008-09.
I tried with javascript native functions but i failed.
how to achive this??
waiting for replay .
Thanks
Prashanth.J
Find more posts tagged with
Comments
mwilliams
Hi Prashanth.J,
Can you explain more of what your issue is? 2008 is one of the values in a drop down and you'd like it to display 2008-09, but still have a value of 2008? Or something else?
prashu_444
hi Michael,
Thanks for ur replay.
My report parameter value is 2008. I want to display it as 2008-09 on my report. I want to know how i can manipulate the paramater value so that it will displayed as 2008-09 .
Thanks
Prashanth.J
mwilliams
Prashanth.J,
If you're using a list box parameter where you have a value of 2008 for data retrieval purposes, but a display value of 2008-09, you can use the following in your report design to get that:
params["ParamName"].displayText
This will only work if you have display values set up for your parameter. If you're using a text box for the user to enter the year, you'll have to do something different. Let me know.
prashu_444
hi Michael,
I want My display value should be 2008 for the parameter. I want modify value from paramenter and show it as 2008-09.
Thanks
Prashanth.j
mwilliams
Prashanth.J,
If doing it the display text way doesn't work for you. Here's a way I got it to work without that. I had an integer parameter called "Year". I entered the value of 2008 into the parameter. In my report I used a data element, set the type to string, and entered the following in the expression:
temp = params["Year"].value + 1;
temp = temp.toString();
params["Year"].value.toString() + "-" + temp.substring(2,4);
This resulted in the following output 2008-09. Since the parameter is an integer, I just add 1 to it and put that in a variable called 'temp'. I then make temp a string so I can use the substring function on it. For the output, I change the parameter to a string, add a '-' character, and then add the last 2 characters of the temp string. This should work for any 4 digit integer year entered.