Page 1 of 1
Databand not showing based on a condition
Posted: Wed Dec 01, 2010 5:49 pm
by JeffZ
Hi all. I hope someone might be able to give me some insight on how to do this. I would like to show a Text area with some text in it instead of the Databand ONLY when there are no rows present in the datasource for that databand. For some of my reports, I need to show a piece of text if no rows are present for the Databand to load. Any help would be appreciated. Thanks!
Databand not showing based on a condition
Posted: Thu Dec 02, 2010 10:11 am
by JorisWils
It may bot be a pretty sollution, but I already do this:
I have 1 master-band having 2 child bands.
I have 1 variable, being a boolean. Let's call it: blnDataAvailable with a default value "false"
in the first child band I print data if there is any
in the after print event of this band I set the variable blnDataAvailable=true;
Right now we have data so the boolean is set to true and we will not print the text.
If we have no data the boolean would still be set to false
then in the second band I place a textbox with text.
In the filter of this band I set the filter to "expression" and filter "blnDataAvailable==false"
You could also disable the second band with a condition.
Databand not showing based on a condition
Posted: Thu Dec 02, 2010 3:01 pm
by JeffZ
Thanks JorisWils. That makes sense. It would be nice if the system had bands for conditional expressions. Maybe something for the next version?
Databand not showing based on a condition
Posted: Fri Dec 03, 2010 4:37 am
by Alex K.
Hello,
Unfortunately, we do not have plans to develop in this direction. On the current moment, the mechanism of condtitions is overloaded and it is very hard to add something.
Thank you.
Databand not showing based on a condition
Posted: Fri Dec 03, 2010 7:31 am
by JorisWils
Aleksey
So would you suggest my sollution too? Or will this bite us in the ass sooner or later?
I actually use this in all our reports over here.
Databand not showing based on a condition
Posted: Fri Dec 03, 2010 8:15 am
by Alex K.
Hello,
We did not mean your suggestion for solving the issue, but ability of adding "bands for conditional expressions" that was requested by JeffZ. The reasons are discribed in my previous post.
Thank you.