Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
dynamic default values in report parameter
HeSchag
Hello,
I am working on a report, which has special requirements on its parameter. It should be multi-select and give a proposal (dynamic default values based on the dataset) for the selection. The criterion for default selection will be provided by the dataset.
I tried to summarize my ideas in the attached file, which is okay with one exception: The dynamic default values...
Find more posts tagged with
Comments
HeSchag
Not even any experiences in that field?
Hans_vd
Hi Herbert,
Replace the single quotes by double quotes and things should work:
var defaultParams = [];
defaultParams[0] = "1";
defaultParams[1] = "2";
defaultParams[2] = "3";
defaultParams;
Success!
Hans
HeSchag
Hello Hans,
Thanks for your reply. - Unfortunately that solution would then be "hard-coded" ...
For me it works with the single quotes as well. - The problem is, that the global variable "defaultParams" seems to be empty. Although it was defined in report-initialization and filled during dataset-onfetch.
I simply need a mechanism to access that global variable in the parameter-script "getDefaultValueList".
Another question is, whether the dataset-onfetch was already carried out at that time. - But how else should the parameter list be filled then?
Greetings,
Herbert
Hans_vd
Herbert,
First of all, sorry for completely missing the point.
I've been playing around a bit to get what you want, but I also can't get it to work.
Hope somebody else can help...
Regards
Hans
Hans_vd
Herbert,<br />
<br />
I put some simple logging statements in the onFetch and the getDefaultValueList list and this is what is in the logfile when te report is started and showing the parameter screen (not pressed Ok yet):<br />
<br />
<blockquote class='ipsBlockquote' ><p>getDefaultValueList<br />
getDefaultValueList<br />
onFetch<br />
onFetch<br />
...<br />
onFetch</p></blockquote>
<br />
After pressing Ok, the file looks like this:<br />
<br />
<blockquote class='ipsBlockquote' ><p>getDefaultValueList<br />
getDefaultValueList<br />
onFetch<br />
onFetch<br />
...<br />
onFetch<br />
getDefaultValueList<br />
getDefaultValueList</p></blockquote>
<br />
<br />
So the getDefaultValueList event occurs (twice) before the records of the data set that provides the parameter values are fetched.<br />
Then when pressing Ok on the parameter screen, it appears the getDefaultValueList event again occurs twice.<br />
<br />
Not really a solution to your problem, but it explains why the way your were trying to achieve things does not work out.<br />
<br />
Regards<br />
Hans