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)
How to dynamically replace list item with label
ssen
I have created a List that is populated with a query. I want to add a message stating that the query returned nothing and not show the list in the case where the returned ResultSet is empty.
How can I achieve this? Can I add a parameterized label that is hidden and is shown in place of the list if the resultset is empty?
Thanks for any info regarding this.
Find more posts tagged with
Comments
mwilliams
Hi ssen,<br />
<br />
You've probably already found a solution to this, but in case someone else has the same question...<br />
<br />
If you create a variable in the initialize script of your report:<br />
<br />
i.e. rowCount = 0;<br />
<br />
Then, in your dataSet, increment the variable for each row returned by the dataSet:<br />
<br />
i.e. in the onFetch script put rowCount++;<br />
<br />
You can then, drop your list from your report based on this value similar to the devShare example below:<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/designing-birt-reports/1027-drop-a-table-based-on-a-report-parameter/#description'>Drop
a Table Based on a Report Parameter - Designs & Code - BIRT Exchange</a><br />
<br />
You would then also set the visibility on the label declaring that the resultSet was empty based on this rowCount variable. If it's greater than 0, you don't drop the list and you don't show the label. If it's still 0, you drop the list and show the label.
Sage81
I saw you can do a multiple find and replace a list of items in text online at <a class='bbc_url' href='
http://list-replace.info'>My
link</a> . Maybe this can help.