Databand not showing based on a condition
Databand not showing based on a condition
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
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.
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.
Using Stimulsoft since 2007
Databand not showing based on a condition
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
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.
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
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.
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.
Using Stimulsoft since 2007
Databand not showing based on a condition
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.
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.