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)
stop dataset from running after 'n' passes
TheShadraq
I have a simple report where a user fills in a param (integer), among other things. The report then should cycle through only the amount of times as the number they entered in the param field.
Since my report is working except for that bit - My question is : is there a way to do this? If so, how would I go about it?
Find more posts tagged with
Comments
Tubal
What do you mean when you say "cycle through"? Are you looking for a top n number of records?
TheShadraq
Yes, that was vague, my apologies. <br />
<br />
No, that's not what I meant. I an building a work forecast report. The users will select how many months they want to look forward (that's the<em class='bbc'> param inteter </em>i mentioned). I then want me dataSet query to run only that many times.<br />
<br />
So, basically I want to enlist a counter that tracks how many times the dataset has been cycled through.
kclark
How are you getting the data? If it's a scripted data set you could create a counter in the open() then do a check when fetching the data like<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if(counter < param["maxParam"]) {
row["someRow"] = // your data
counter++;
return true;
}
return false;
</pre>
<br />
This will loop through and gather all the data up to the parameter.
TheShadraq
KClark,
thanks for the reply. the data is coming through as a scripted data set. I do not know how to create a param inside a dataset. Would you be willing to give me a quick hand?
Thanks,
Shadraq
TheShadraq
kclark, nevermind, I figured out how to do the counter param. I suppose, though, that my question wasn't fully explained correctly.<br />
<br />
After the dataSet runs in full then I'd like<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if(counter < param["maxParam"]) { //rerun the whole dataSet again}</pre>