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)
Cancel execution of a DataSet
brunocobra
I have 2 DataSets on a Report, but only one it's used. This control occurs with a report parameter, and I hide the table of DataSet that's don't used.
However, there's a problem: the two DataSet is executed, even if I hide some table. Such DataSet returns around 10 thousand rows and, so this, I CAN'T execute one of these DataSets... how can I do that??
Please, anyone helps!
Sorry for my English...
Find more posts tagged with
Comments
bhanley
Because the data set is bound to a control on the report, I do not know if there is a way to stop it from executing. Another option is to set the query text of the data set you do not need to only get one row in the scripting layer.
You can override the Query Text in the beforeopen event by setting "this.queryText" to a different query that will only grab a row and will not impact your execution time much at all.
brunocobra
Hi! Thanks for your reply, but I solved my problem with a different way: on beforeFactory event, I put the following code:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>var design_handle = reportContext.getReportRunnable().designHandle.getDesignHandle();
if (params["my_param"] == "S") {
design_handle.findElement("table_dataSet1").drop();
this.getDataSet("dataSet1").queryText = "select 1 from dual";
} else {
design_handle.findElement("table_dataSet2").drop();
this.getDataSet("dataSet2").queryText = "select 1 from dual";
}</pre>
<br />
With this, I drop the table element that I'll not need use and change the queryText to guarantee a simple and "harmless" execution.
bhanley
Good solution. Thanks for sharing it with the forum.