on 05-15-2009 5:57 AM
Hi this is Prasad,
I want to display a pie chart with the associated results from the query template.It is working fine if I have any values in the database.I want to Display the Text 'No Data is Found' if i dont have data in the database.Is it possible to display like this.Can anyone help on this.
Thanks,
Prasad.
Hi Ram
Use a hidden grid by using same query.
Get the rowcount of your applet.If row count is zero, then hide the applet and display the message.
document.appletname.style.visibility="hidden";
document.appletname.style.visibility = "visible";
try like this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The 'No Data Available' message only displays when a fatal error occurs but not 0 rows (not desirable in this case). How about adding the UpdateEvent in your PARAM tags and in the corresponding function doing something like this:
var myApplet = document.APPLETNAME;
var myChart = myApplet.getChartObject();
if (parseInt(myChart.getNumberOfDataPoints(1)) > 0) {
myChart.setTitle("You have pie slices");
} else {
myChart.setTitle("No Records Found");
}
myApplet.setUpdateEventEnabled(false);
myApplet.updateChart(false);
myApplet.setUpdateEventEnabled(true);
This should allow you to use standard stuff and not incorporate monkey business with hidden/visible divs and/or additional applets just for running separate queries.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.