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)
Just Drop Everything
zax
Hi,<br />
<br />
This should be easy, but hunting around the API I cannot see a good solution. I have a condition in the <strong class='bbc'>beforeFactory</strong> event, that if it is not met, everything in the report should be dropped and I should display a text box containing an error message.<br />
<br />
I can drop individual elements using:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>reportContext.getDesignHandle().findElement("ElementName").drop();</pre>
<br />
and a data source using:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>reportContext.getDesignHandle().getDataSources().get(0).drop();</pre>
<br />
but, is there a way of just dropping everything in the report and then dynamically create a text box?<br />
<br />
Thanks,<br />
Stephen
Find more posts tagged with
Comments
CBR
Hi Stephen,
there is no method to drop everything in the report, but:
If you drop a parent element all children are dropped. You have multiple options. The easiest option is to create a grid (1 row, 1, column) that contains all report contents. If you drop that grid your report will be completely empty.
Concerning the dataSource:
You don't need to drop it. If there is no element accessing data of this datasource in your report it will not cause any database connection beeing opened or code beeing executed.
I m suggesting to add the text element as well as part of your report. In beforeFactory find that text element and change it's content. This heavily depends on the concrete type of that element (label, dynamic text, Text). It s hard to make a suggestion which one to use because i don't know what it should do.
zax
Thanks for that, I created a single grid cell and that drops very nicely. Thanks.