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)
Remove DataSet
jfreak53
How do I remove a DataSet, or stop it from running the query, and remove the corresponding table if X parameter is true in the parameter window? I have 3 different queries in my report and 3 tables, one for each. But only one is used at a time and it makes it really slow to have to run all 3 queries when only one is used.
Find more posts tagged with
Comments
mwilliams
Hi jfreak53,
You can check your parameter values and drop the appropriate report items in the beforeFactory method of the report design. Let me know if you had any questions.
jfreak53
Ok, how do I drop them ha ha, sorry never done it yet.
mwilliams
If you name your table, "myTable", you'd use the following in your beforeFactory:
reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("myTable").drop();
You'd just surround this statement with a check to whether the parameter associated with this table was the one selected or not.
When a dataSet doesn't have an attached report Element, it doesn't run, so this should solve your issue.
jfreak53
Wonderful!! Works like a charm. Thanks for the help, I never would of figured that long line out ha ha
mwilliams
Excellent. Always glad to help!
jfreak53
Out of curiosity, where is that at in the documentation? That way I have some where to start from and know how it works. I couldn't find anything related to that in the docs.
jfreak53
Also, let's keep this thing open a bit more ha ha
Is there a way to remove a table's group at runtime? I tried the same thing but of course no go ha ha.
mwilliams
I believe you can write an expression on what to group on in the group editor. If you pass no value to the grouping, it will not group the table. at least I think this is the case. As far as the documentation, the javadoc is the best there is. It can be very hard to follow at times. The best thing to do is exactly what you did, ask if you can't find it!
jfreak53
WOW, cool! This was a lot easier than removing it like I wanted to do.
I didn't even see the little FX button in the group editing window ha ha. I applied the same thing to a filter I had to make and it worked! That saved me a lot of time, I was going to create 3 different tables to make the same thing work.
BIRT is awesome!! Thanks for the help.
mwilliams
As always, you're very welcome!