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)
disable query
digiSeryog
hi how can i disable a query?
i have a global value and if the value is 1 i want to disable the query.
i tried it with
if(reportContext.getGlobalVariable("isExpansion") == 1)
this.queryText = "";
but its not working
Find more posts tagged with
Comments
Tubal
Is that in your beforeOpen script?<br />
<br />
Another thing you could try is dropping the table or grid that holds the results of the query. <br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>var myGrid = reportContext.getDesignHandle().findElement("myGrid");
myGrid.drop(); //this line removes the grid from the report object model just for this run}</pre>
<br />
If you've got bindings that use that dataset, I imagine you'd error out if you got rid of your query and left your bindings. Getting rid of the table/grid removes your bindings too.
digiSeryog
yes its beforeOpen
and i know i use the global variable to hide the charts/table but i cant debug because its not working
Tubal
Where are you defining your global variable?
And have you checked to see if it's defined/set?
I like to use the console for debugging. It lets me know if something is really happening the way I think it is.
http://birtworld.blogspot.com/2010/01/quick-and-dirty-logging.html
I would run eclipse with the console, and as soon as you set your variable, send it's value to the console to see what's there.
digiSeryog
thx i solved the problem i thought Report Parameters are global variables.